-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bob Proulx on 3/13/2009 3:03 PM: >> This works perfect for all dates I used so far, apart from a (strangely >> enough) 20081026 >> date -d "20081026 1 days" +%Y%m%d >> returns the same datecode: 20081026 > > You probably want to do the date calculation at noon to avoid problems > near time change since one day is really 24 hours. And working in UTC > is safer.
In case you missed the previous message on this topic, the key point is that not all days are 24 hours - depending on your time zone, some days are 23 or 25 hours thanks to daylight savings, while the "1 days" modifier always operates in terms of 24 hours. http://lists.gnu.org/archive/html/bug-coreutils/2009-03/msg00160.html - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----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 iEYEARECAAYFAkm6/2kACgkQ84KuGfSFAYD2TgCgyR2XtkUcdKAcMYVvkyUtIsMi I60AnjIKS6lgIPS0ErdOPaK6a2MiO/KH =TRW5 -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils