Skip to content

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

@tirkarthi

Description

@tirkarthi

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.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions