This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: `TZ=Pacific/Kwajalein date -d 1993-08-20` doesn't fail
This thread got me to dig deeper into the TZ/DST
algorithm, and what I found was interesting and
probably worthwhile mentioning in the User Guide.
I work in the Eastern timezone of the U.S. and have
been content with the default TZ behavior, i.e.,
TZ is not set, so I presume that Cygwin is letting
Windows provide the DST algorithm (?). But apparently
this is incorrect for years prior to 2007 when the US
DST rules last changed.
With TZ undefined, I see (incorrectly):
$ date -d 2006-04-02
Sun Apr 2 00:00:00 EDT 2006
$ date -d 2006-04-03
Mon Apr 3 00:00:00 EDT 2006
$
With TZ=US/Eastern, I see (correctly):
$ export TZ=US/Eastern
$ date -d 2006-04-02
Sun Apr 2 00:00:00 EST 2006
$ date -d 2006-04-03
Mon Apr 3 00:00:00 EDT 2006
$
Those who care about correct DST reporting may
want to specifically set TZ rather than let
it default.
--Ken Nellis