Skip to content

datetime.utcnow() is deprecated in Python 3.12 #110

Open
@DrGFreeman

Description

@DrGFreeman

When running in Python 3.12 and above, the following warning is issued:

.../site-packages/json_logging/__init__.py:247: DeprecationWarning: datetime
is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.
    utcnow = datetime.utcnow()

Ref. https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcnow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions