[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/bin/date handling of daylight savings
From: |
Jean-Yves Provost |
Subject: |
/bin/date handling of daylight savings |
Date: |
Mon, 29 Oct 2001 17:07:04 +1100 |
Hi,
This is rather interesting:
Australia/Sydney timezone moved to daylight savings last sunday
----
address@hidden jyp]$ zdump -c 2002 -v Australia/Sydney |grep 2001
Australia/Sydney Sat Mar 24 15:59:59 2001 UTC = Sun Mar 25 02:59:59 2001 EST
isdst=1 gmtoff=39600
Australia/Sydney Sat Mar 24 16:00:00 2001 UTC = Sun Mar 25 02:00:00 2001 EST
isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 27 15:59:59 2001 UTC = Sun Oct 28 01:59:59 2001 EST
isdst=0 gmtoff=36000
Australia/Sydney Sat Oct 27 16:00:00 2001 UTC = Sun Oct 28 03:00:00 2001 EST
isdst=1 gmtoff=39600
----
all /bin/date command using the -d "last xxxday" is 1 day out (1 hour
actually 00:00 - 01:00 = 23:00 the previous day)
address@hidden jyp]$ date -d "last monday"
Sun Oct 21 23:00:00 EST 2001
address@hidden jyp]$ date -d "last tuesday"
Mon Oct 22 23:00:00 EST 2001
address@hidden jyp]$ date -d "last wednesday"
Tue Oct 23 23:00:00 EST 2001
address@hidden jyp]$ date -d "last sunday"
Sat Oct 27 23:00:00 EST 2001
address@hidden jyp]$ date -d "last saturday"
Fri Oct 26 23:00:00 EST 2001
--------
Calling to date into the future is fine
-----
address@hidden jyp]$ date -d "next sunday"
Sun Nov 4 00:00:00 EST 2001
address@hidden jyp]$
-----
I'm running Mandrake 8.0, 2.4.12 kernel
address@hidden jyp]$ rpm -qf /bin/date
sh-utils-2.0-13mdk
address@hidden jyp]$date --version
date (GNU sh-utils) 2.0
Written by David MacKenzie.
Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm happy to provide further details if required
Jean-Yves Provost
- /bin/date handling of daylight savings,
Jean-Yves Provost <=