DateTime default timezone wrong in some locations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DateTime |
Invalid
|
Medium
|
Lennart Regebro |
Bug Description
DateTime currently relies on just time.tzname to determine the default timezone. Unfortunatly, these strings are not unique. This is the case in Australia, and possibly other areas in the world, on many Unix based systems:
>>> time.tzname
('EST', 'EST')
>>> time.timezone
-36000
>>> time.altzone
-39600
A possible solution would be to insert a check. After retrieving the timezone strings, check time.timezone to see if the offset in seconds matches what is expected. If not, convert the offset to a GMT+XX string and use that as the local timezone. This solution would also future proof the DateTime library to some extent, as well as making Australian's happier. Current workarounds do not handle daylight savings issues.
affects: | zope2 → datetime |
Status: Pending => Rejected
There are unique international standards for what to call your timezones. If Zope doesn't support them, then that is a bug with Zope. If your unix system doesn't support, then that is also a bug, but not with Zope. :)