Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime.utcnow and datetime.utcfromtimestamp are deprecated in Python 3.12 #297

Closed
tirkarthi opened this issue Jul 8, 2023 · 0 comments · Fixed by #308
Closed

datetime.utcnow and datetime.utcfromtimestamp are deprecated in Python 3.12 #297

tirkarthi opened this issue Jul 8, 2023 · 0 comments · Fixed by #308
Assignees

Comments

@tirkarthi
Copy link

https://github.com/sdispater/tomlkit/blob/a3cb8a2b71bd70001d13e5455177d5fe96208256/tests/test_items.py#L106

datetime.datetime’s utcnow() and utcfromtimestamp() are deprecated and will be removed in a future version. Instead, use timezone-aware objects to represent datetimes in UTC: respectively, call now() and fromtimestamp() with the tz parameter set to datetime.UTC. (Contributed by Paul Ganssle in python/cpython#103857.)

@frostming frostming self-assigned this Jul 27, 2023
frostming added a commit that referenced this issue Jul 27, 2023
Fixes #297

Signed-off-by: Frost Ming <me@frostming.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants