- Notifications
You must be signed in to change notification settings - Fork186
Closed
Description
Proposal:
Starting with Python 3.12datetime.utcfromtimestamp
will be deprecated in favor of the timezone awaredatetime.fromtimestamp
.https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcfromtimestamp
AFAICT this only effects one instance in the active (excluding examples) code base and the fix should be pretty simple
EPOCH=datetime.utcfromtimestamp(0).replace(tzinfo=timezone.utc) |
- EPOCH = datetime.utcfromtimestamp(0).replace(tzinfo=timezone.utc)+ EPOCH = datetime.fromtimestamp(0, tz=timezone.utc)
Note:datetime.utcnow()
will also be deprecated in favor ofdatetime.now(tz=timezone.utc)
but that's only used in examples or tests.https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcnow