Message163993
| 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. |
|