-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Description
Proposal:
Starting with Python 3.12 datetime.utcfromtimestamp
will be deprecated in favor of the timezone aware datetime.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 of datetime.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
ykun91
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working