[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] gawk with dates before 1970
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] gawk with dates before 1970 |
Date: |
Tue, 14 Apr 2015 15:56:30 +0300 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
> Thanks for bringing this up, but your issue is only one part of the problem.
> We have two flaws in the current code:
>
> 1. We should check the return code from localtime/gmtime to make sure that it
> is not NULL. Currently, if the time_t value is outside the range supported by
> the C library, we get back a NULL pointer that we then blindly pass to
> strftime, and that results in a crash. The question then becomes whether we
> should issue a fatal error or return an empty string. I'm not a big fan of
> fatal errors...
I will fix to return an empty string. Maybe adding a lint message.
> 2. There's a general question of how to handle the case where the
> floating-point timestamp argument cannot be converted to a time_t that
> preserves its value. This goes beyond the signed/unsigned concern that
> Eli raised.
This is a general issue in awk/gawk. At some point the user has to
know what s/he is doing, and I think this is one of those points.
Thanks
Arnold
- Re: [bug-gawk] gawk with dates before 1970, Glaudiston Gomes da Silva, 2015/04/09
- Re: [bug-gawk] gawk with dates before 1970, Eli Zaretskii, 2015/04/10
- Re: [bug-gawk] gawk with dates before 1970, Aharon Robbins, 2015/04/13
- Re: [bug-gawk] gawk with dates before 1970, Andrew J. Schorr, 2015/04/13
- Re: [bug-gawk] gawk with dates before 1970, Andrew J. Schorr, 2015/04/13
- Re: [bug-gawk] gawk with dates before 1970, Glaudiston Gomes da Silva, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Andrew J. Schorr, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970,
Aharon Robbins <=
- Re: [bug-gawk] gawk with dates before 1970, Eli Zaretskii, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Aharon Robbins, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Eli Zaretskii, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Andrew J. Schorr, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Aharon Robbins, 2015/04/16
- Re: [bug-gawk] gawk with dates before 1970, Andrew J. Schorr, 2015/04/16
- Re: [bug-gawk] gawk with dates before 1970, Aharon Robbins, 2015/04/16
- Re: [bug-gawk] gawk with dates before 1970, Eli Zaretskii, 2015/04/14
- Re: [bug-gawk] gawk with dates before 1970, Eli Zaretskii, 2015/04/14