Time travel

L

Lee Merrill

I'm seeing an anomaly in the python time function on March 9, 2008
(the "spring foward" time):
1205046000.0

Does anyone have an idea as to what might cause a 4000 seconds
backwards jump on March 9th of last year? I would have expected 3600
seconds.

Thanks,
Lee

P.S. A full program demonstrating the question:

#!/usr/bin/env python

import time, datetime

d1 = datetime.datetime(2008, 3, 9, 2, 59, 0).timetuple()
#!/usr/bin/env python

import time, datetime

d1 = datetime.datetime(2008, 3, 9, 2, 59, 0).timetuple()
d2 = datetime.datetime(2008, 3, 9, 3, 0, 0).timetuple()
t1 = time.mktime(d1)
t2 = time.mktime(d2)

print t1, t2
 
G

greg

Lee said:
And I can't do arithmetic, it is actually about 3600--never mind!

Don't feel too bad. Obviously Guido nipped back to
March 8 2008 in his time machine and fixed the problem,
making it *look* like you can't do arithmetic. Time
travel often leads to embarrassments like that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top