#733 closed defect (fixed)
allmydata.util.time_format.iso_utc_time_to_seconds() doesn't work in London if you ask it what the unix timestamp was in the 1970's
Reported by: | zooko | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 1.5.0 |
Component: | code | Version: | 1.4.1 |
Keywords: | ARM | Cc: | |
Launchpad Bug: |
Description
http://allmydata.org/buildbot/builders/Zandr%20Lenny-armel/builds/101/steps/test/logs/stdio
I added some debug printouts:
time.mktime((1970, 1, 1, 0, 0, 1, 0, 1, 0)) == -3599.0
and
time.timezone == 0
That means that Zandr's linkstation says that the epoch began in its timezone one hour before it began in UTC, but also says that its timezone is the same as UTC. :-(
Change History (6)
comment:1 Changed at 2009-06-11T19:38:47Z by zandr
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed at 2009-06-11T22:09:09Z by zooko
- Resolution invalid deleted
- Status changed from closed to reopened
- Summary changed from time.mktime() wrong on Zandr's ARM box to allmydata.util.time_format.iso_utc_time_to_seconds() doesn't work in London if you ask it what the unix timestamp was in the 1970's
Changed the name of this ticket to reflect the fact that this function doesn't work in London, if you ask it what the unix timestamp was in the 1970's, and reopened the ticket. :-)
comment:3 Changed at 2009-06-11T22:09:31Z by zooko
- Resolution set to fixed
- Status changed from reopened to closed
Added a unit test of whether time_format's iso_utc_time_to_seconds() works in London, fixed it so that it does work in London. Fixed by 8978cb073874b7d6.
comment:4 Changed at 2009-06-13T03:02:41Z by zooko
- Resolution fixed deleted
- Status changed from closed to reopened
8978cb073874b7d6 doesn't work on Windows.
comment:5 Changed at 2009-06-13T03:34:34Z by zooko
- Resolution set to fixed
- Status changed from reopened to closed
Fixed again by 45928315f6546185. 45928315f6546185 is horrible. If you can make a simpler implementation that passes the unit tests, please go right ahead!
comment:6 Changed at 2009-06-13T16:49:51Z by zooko
Fixed in a clean way by cc2953e6632d6efb. Thanks, Black Dew! Opened http://bugs.python.org/issue6280 to complain about the fact that the function we were wishing for was always there in the Python Standard Library, but just in the wrong module.
Which is all correct for Europe/London? http://en.wikipedia.org/wiki/British_Summer_Time#Single.2FDouble_Summer_Time
Feel free to pick a more rational /etc/timezone, Americas/Los_Angeles is probably correct, but I could be talked into UTC