Hello!  I may have found a bug in the GNU date.  I expected that the
following statements would give the same result:

                date ; date -d '01/01/1970 utc '`date +%s`' secs'

But the results are off by an hour:

                Wed May 16 12:38:31 EDT 2001
                Wed May 16 13:38:31 EDT 2001

I haven't delved into the source code for date (I'm no expert programmer)
but I suspect that the problem may be because I'm starting with a date out
of daylight savings time (start of epoch) and adding a number of seconds to
arrive at a result within daylight savings time... somewhere it adds the
extra hour.  I've worked out a workaround for my scripts, but it's a bit of
a kludge.

Is this a bug?  If not, can you explain this unexpected behaviour?

_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to