bug-coreutils
[Top][All Lists]
Advanced

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

Re: date +%s ignores TZ


From: Bob Proulx
Subject: Re: date +%s ignores TZ
Date: Sat, 1 Mar 2008 13:32:31 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Andreas Schwab wrote:
> This will fail during the day after a DST transition.

Which points out a terrible bug in my suggestion of how to map the
range of 0-(N-1) to the range of 1-N!

Bob wrote this buggy code:
>>  case $secondssincedaystart in (0) secondssincedaystart=86400 ;; esac

That will obviously fail miserably at midnight on the day after a dst
change.  Another reason not to do it!

Bob




reply via email to

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