This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joris.geysens
Recipients joris.geysens
Date 2022-02-25.16:10:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645805401.57.0.267496020204.issue46856@roundup.psfhosted.org>
In-reply-to
Content
Reading the documentation, I don't understand how this is not possible : 

# get the max utc timestamp
ts = datetime.max.replace(tzinfo=timezone.utc).timestamp()

# similarly 
ts2 = datetime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=timezone.utc).timestamp()

# timestamp value 253402300800 seems correct
# converting back to timestamp is impossible, these all fail : 

dt = datetime.fromtimestamp(ts, tz=timezone.utc)
dt = datetime.utcfromtimestamp(ts)

It should be possible to get a datetime back from the initially converted timestamp, no?
History
Date User Action Args
2022-02-25 16:10:01joris.geysenssetrecipients: + joris.geysens
2022-02-25 16:10:01joris.geysenssetmessageid: <1645805401.57.0.267496020204.issue46856@roundup.psfhosted.org>
2022-02-25 16:10:01joris.geysenslinkissue46856 messages
2022-02-25 16:10:01joris.geysenscreate