bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Problem with strftime


From: Aharon Robbins
Subject: Re: [bug-gawk] Problem with strftime
Date: Mon, 24 Oct 2011 05:13:42 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi. Thanks. I understand this, but IIRC there are systems where time_t
is unsigned.  In general, negative time_t values aren't portable.

Not all systems are GNU/Linux... :-)

Thanks,

Arnold

> Date: Fri, 21 Oct 2011 15:29:56 +0200
> From: Hermann Peifer <address@hidden>
> To: Aharon Robbins <address@hidden>
> CC: address@hidden
> Subject: Re: [bug-gawk] Problem with strftime
>
> On 21/10/2011 15:05, Aharon Robbins wrote:
> > Hi. The problem is defining "reasonable" negative values. I don't want
> > to uglify the code and in any case whatever heuristic I use will be
> > wrong for someone.
> >
> > Perhaps it's reasonable to allow it to be negative by one day, to allow
> > for time zone differences, but that's it.
> >
> > Unless someone complains bitterly, I'm going to leave it as is.
> >
> > Thanks,
> >
> > Arnold
> >
>
> No complaint or anything from my side, I just thought that as mktime() 
> also generates negative values, e.g.:
>
> $ TZ=UTC gawk 'BEGIN{print mktime("1969 12 31 0 0 0")}'
> -86400
>
> ...it could also make sense that strftime() can convert this 
> (reasonable) negative value back to a string. But I do see the problem 
> with separating "reasonable" negative values from "unreasonable" ones.
>
> Hermann



reply via email to

[Prev in Thread] Current Thread [Next in Thread]