bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug in GNU date ??


From: Paul Eggert
Subject: Re: Bug in GNU date ??
Date: Tue, 06 Apr 2004 18:27:58 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"MUTTON, PETER" <address@hidden> writes:

>     #> /usr/local/bin/date -u -d "Sat Apr  3 16:42:28 EDT 2004"
>     Sat Apr  3 20:42:28 UTC 2004
>
>                ^^ should be 21 as we moved to Daylight Saving time
>                   on Apr 4

I don't see any bug there.  The -d operand specifies EDT, so GNU date
assumes that you meant Eastern Daylight Time.

Here's how to get the behavior that you prefer:

$ /usr/local/bin/date -u -d "Sat Apr  3 16:42:28 EST 2004"
Sat Apr  3 21:42:28 UTC 2004

Or better yet, since alphabetic time zone abbreviations aren't
standardized:

$ /usr/local/bin/date -u -d "Sat Apr  3 16:42:28 -0500 2004"
Sat Apr  3 21:42:28 UTC 2004




reply via email to

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