LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   DST Time Change in Australia not working (https://www.linuxquestions.org/questions/linux-general-1/dst-time-change-in-australia-not-working-589099/)

prpersonal 10-03-2007 07:59 AM

DST Time Change in Australia not working
 
Hello All,
I wanted to update my linux box with the recent DST changes in Australia/Newzealand. I downloaded the latest tzdata from ftp://elsie.nci.nih.gov/pub/ and I compiled 'australasia' using zic compiler. I replaced the latest timezone settings for Australia in /usr/share/zoneinfo.

zdump shows the recent DST changes for Australian time zones. (from 2008, daylight savings starts on the first Sunday in October and end on the first Sunday in April)

[root@a10-10-4-61 root]# zdump -v /etc/localtime | grep 2008
/etc/localtime Sat Apr 5 16:29:59 2008 UTC = Sun Apr 6 02:59:59 2008 CST isdst=1 gmtoff=37800
/etc/localtime Sat Apr 5 16:30:00 2008 UTC = Sun Apr 6 02:00:00 2008 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 4 16:29:59 2008 UTC = Sun Oct 5 01:59:59 2008 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 4 16:30:00 2008 UTC = Sun Oct 5 03:00:00 2008 CST isdst=1 gmtoff=37800
[root@a10-10-4-61 root]#

Now my problem is, DST settings for Australia starts correctly on first sunday of October, but it is not ending at first sunday of April.

DST START: (working perfectly)
---------

[root@a10-10-4-61 root]# date
Sun Oct 5 01:59:59 CST 2008
[root@a10-10-4-61 root]# date
Sun Oct 5 03:00:00 CST 2008
[root@a10-10-4-61 root]#

DST END: (not working)
--------

[root@a10-10-4-61 root]# date
Sun Apr 6 02:59:59 CST 2008
[root@a10-10-4-61 root]# date
Sun Apr 6 03:00:00 CST 2008
[root@a10-10-4-61 root]#

To cross verify, I tried the same things in Fedora Core 7 without the patch, there also I observed the same behavior. i.e., without the patch, DST correctly starts on last Sunday of October, but not ending at last Sunday of march.

Not sure if I am doing something wrong.

Any help would be highly appreciated.

Thanks for your time,
Prabhu

AlucardZero 10-03-2007 08:26 AM

Try seeing what happens at 1:59:59?

prpersonal 10-03-2007 08:31 AM

Yes I tried that too, and observed the same behavior.

regis_n_bits 10-03-2007 01:03 PM

I think the problem may be that you are going backwards in time when testing the Daylight Saving Time changes (i.e. doing the Oct 2008 first, and then Apr 2008).

Try doing the Daylight Saving time changes in the order they would occur.

1. First, set the date/time to the current time and date (which is Standard time).

2. Advance the date/time to just before the expected time change in Oct 2007 (changing from Standard to Daylight). You should see the time advance by 1 hour.

If you see the time change then you are definately in Daylight Saving Time. The next step will not work if you are not in Daylight Saving Time.

(I noticed that your zdump output always shows the acronym for your timezone as CST. That's odd. Here in North America we change the middle letter to indicate when DST is active (e.g. EST <-> EDT). That make it easier to tell when DST is active.)

3. Now advance the date/time to just before the expected time change in Apr 2008 (changing from Daylight to Standard). You should see the time go back one hour.

4. Now advance the date/time to just before the expected time change in Oct 2008 (changing from Daylight to Standard). The time should go forward 1 hour.

prpersonal 10-04-2007 02:45 AM

Yes I tried that too, but not seeing any difference. Pl. check the following output:

[root@a10-10-4-61 root]# zdump -v /etc/localtime | grep 2007
/etc/localtime Sat Mar 24 16:29:59 2007 UTC = Sun Mar 25 02:59:59 2007 CST isdst=1 gmtoff=37800
/etc/localtime Sat Mar 24 16:30:00 2007 UTC = Sun Mar 25 02:00:00 2007 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 27 16:29:59 2007 UTC = Sun Oct 28 01:59:59 2007 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 27 16:30:00 2007 UTC = Sun Oct 28 03:00:00 2007 CST isdst=1 gmtoff=37800
[root@a10-10-4-61 root]#

[root@a10-10-4-61 root]# zdump -v /etc/localtime | grep 2008
/etc/localtime Sat Apr 5 16:29:59 2008 UTC = Sun Apr 6 02:59:59 2008 CST isdst=1 gmtoff=37800
/etc/localtime Sat Apr 5 16:30:00 2008 UTC = Sun Apr 6 02:00:00 2008 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 4 16:29:59 2008 UTC = Sun Oct 5 01:59:59 2008 CST isdst=0 gmtoff=34200
/etc/localtime Sat Oct 4 16:30:00 2008 UTC = Sun Oct 5 03:00:00 2008 CST isdst=1 gmtoff=37800
[root@a10-10-4-61 root]#

DST STARTING CORRECTLY ON OCT'2007
----------------------------------

[root@a10-10-4-61 root]# date -s "01:59:55 October 28, 2007"
Sun Oct 28 01:59:55 CST 2007
[root@a10-10-4-61 root]# date
Sun Oct 28 01:59:59 CST 2007
[root@a10-10-4-61 root]# date
Sun Oct 28 03:00:00 CST 2007
[root@a10-10-4-61 root]#

DST NOT ENDING ON APRIL'2008
----------------------------

[root@a10-10-4-61 root]# date -s "02:59:55 April 06, 2008"
Sun Apr 6 02:59:55 CST 2008
[root@a10-10-4-61 root]# date
Sun Apr 6 02:59:59 CST 2008
[root@a10-10-4-61 root]# date
Sun Apr 6 03:00:00 CST 2008
[root@a10-10-4-61 root]#

DST AGAIN STARTS CORRECTLY ON OCT'2008
--------------------------------------

[root@a10-10-4-61 root]# date -s "01:59:55 October 05, 2008"
Sun Oct 5 01:59:55 CST 2008
[root@a10-10-4-61 root]# date
Sun Oct 5 01:59:59 CST 2008
[root@a10-10-4-61 root]# date
Sun Oct 5 03:00:00 CST 2008

For 2009, again DST is not ending correctly on April.

georgewr3 10-11-2007 04:15 PM

A new timezonedb package was just released.

http://pecl.php.net/get/timezonedb

Try that.

syg00 10-11-2007 04:58 PM

Er ... move to Queensland, problem solved ... :p


All times are GMT -5. The time now is 12:57 AM.