4 ms·
I'm in the Mountain Time Zone (GMT-6 right now): #!/usr/bin/env python import datetime for when_was in xrange(0,10): print datetime.datetime.fromtime
by krt 12y ago
I'm in the Mountain Time Zone (GMT-6 right now):
#!/usr/bin/env python
import datetime
for when_was in xrange(0,10):
print datetime.datetime.fromtimestamp(14 * 10**when_was)
$ ./theabove.py
1969-12-31 17:00:14
1969-12-31 17:02:20
1969-12-31 17:23:20
1969-12-31 20:53:20
1970-01-02 07:53:20
1970-01-16 21:53:20
1970-06-11 18:53:20
1974-06-09 02:53:20
2014-05-13 10:53:20
2413-08-22 17:53:20
<krt@box>:~$ python -c "import datetime;print datetime.datetime.fromtimestamp(1400000000)"
2014-05-13 09:53:20
- KayEss 12y agoLooks like you overflowed when when_was == 9, or maybe there's a time machine involved?