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 belopolsky
Recipients Alexander.Belopolsky, barry, belopolsky, pitrou, r.david.murray, skrah, vstinner
Date 2012-06-25.17:07:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340644042.05.0.892966499831.issue15165@psf.upfronthosting.co.za>
In-reply-to
Content
I am surprised that we don't see the same failure on 32-bit windows buildbot.  Windows mktime does not support negative time_t in either 32 or 64 bit version:

http://msdn.microsoft.com/en-us/library/d1y53h2a(v=vs.110).aspx

We are probably just lucky and no Windows buildbot uses a TZ set ahead of UTC.   Stefan, what is your timezone?

What is happening here is that mktime() is called for 1970-01-01 00:00 which results in positive timestamp for the timezones west of Greenwich and negative timestamp east of Greenwich.  For example, using GNU date:

$ TZ=Europe/Paris date -d "1970-01-01 00:00" +%s
-3600

$ TZ=America/New_York date -d "1970-01-01 00:00" +%s
18000

I am adding Victor as an expert on pushing the limits of date/time functions.
History
Date User Action Args
2012-06-25 17:07:22belopolskysetrecipients: + belopolsky, barry, pitrou, vstinner, r.david.murray, skrah, Alexander.Belopolsky
2012-06-25 17:07:22belopolskysetmessageid: <1340644042.05.0.892966499831.issue15165@psf.upfronthosting.co.za>
2012-06-25 17:07:21belopolskylinkissue15165 messages
2012-06-25 17:07:21belopolskycreate