[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "date -d '-X day' returning wrong day around StandardTime/DaylightTi
Re: "date -d '-X day' returning wrong day around StandardTime/DaylightTime change-over
Thu, 12 Mar 2009 18:48:03 -0600
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20081209 Thunderbird/220.127.116.11 Mnenhy/0.7.6.666
-----BEGIN PGP SIGNED MESSAGE-----
According to Philip Zimmerman (phzimmer) on 3/12/2009 9:10 AM:
> I've noticed a behavior of the 'date' utility as a result of the DST
> change-over, and was wondering whether this is "expected behavior" or whether
> this is a problem, so I'm inquiring whether anyone else has noticed this.
Yes. In fact, so many people have noticed it that it is a FAQ:
The issue at hand is that you are dealing with a 23 (or 25) hour day, so
calculations that add or subtract 24 hours will inherently put you 2
calendar days away. It is not a bug, merely a misunderstanding of how the
tool works. And changing the behavior to fit your desired needs will
break someone else who has grown accustomed to the current behavior.
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----