This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jamesh
Date 2007-03-05.10:03:49
SpamBayes Score
Marked as misclassified
In Western Australia, a 3 year daylight saving trial was introduced starting on 3rd December 2006.  Prior to that, we had no daylight saving shifts (the previous time we had daylight saving was 15 years ago in another trial).

Since there was no daylight savings for 1st January 2006 and 1st July 2006, time.timezone and time.altzone were both equal to -28800 (UTC+8) for Python interpreters run in 2006.

I am sure that I had the tzdata updates installed: my computer displayed the correct time, and listed the UTC offset as +0900 in December.  Creating a time tuple for a date in December 2006 had the tm_isdst flag set to 1.

If I was programming this in C, I'd use the tm_gmtoff field of "struct tm" if it was available.  On platforms that don't provide tm_gmtoff, other platform specific methods would be needed (e.g. using timezone/altzone).

The other alternative is to do date arithmetic on the results of localtime() and gmtime(), as you say.
Date User Action Args
2007-08-23 14:51:37adminlinkissue1647654 messages
2007-08-23 14:51:37admincreate