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.
Veebers, the differences you are seeing are due to timezone.
>>> datetime. datetime. utcfromtimestam p(2047570047) datetime( 2034, 11, 19, 17, 27, 27) datetime. utcfromtimestam p(0) + datetime. timedelta( seconds= 2047570047) datetime( 2034, 11, 19, 17, 27, 27)
datetime.
>>> datetime.
datetime.
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( 2034, 11, 19, 11, 27, 27) datetime. fromtimestamp( 0) + datetime. timedelta( seconds= 2047570047) datetime( 2034, 11, 19, 11, 27, 27)
datetime.
>>> datetime.
datetime.
My tz is -6, so I correctly get 11 as the hour.