Comment 6 for bug 1328600

Revision history for this message
Leo Arias (elopio) wrote :

Veebers, the differences you are seeing are due to timezone.

>>> datetime.datetime.utcfromtimestamp(2047570047)
datetime.datetime(2034, 11, 19, 17, 27, 27)
>>> datetime.datetime.utcfromtimestamp(0) + datetime.timedelta(seconds=2047570047)
datetime.datetime(2034, 11, 19, 17, 27, 27)

There seems to be something weird on your machine, because without the utc calls you should get the same date on both calls, that's the part I don't understand.

>>> datetime.datetime.fromtimestamp(2047570047)
datetime.datetime(2034, 11, 19, 11, 27, 27)
>>> datetime.datetime.fromtimestamp(0) + datetime.timedelta(seconds=2047570047)
datetime.datetime(2034, 11, 19, 11, 27, 27)

My tz is -6, so I correctly get 11 as the hour.