Skip to content

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

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

Activity

  1. DrGFreeman commented on Dec 12, 2024

    @DrGFreeman
    Author

    Looks like #107 addresses this issue.

  2. donbowman commented on Jul 1, 2025

    @donbowman
    Contributor

    this fix is now merged.

  3. dwt commented on Jul 5, 2025

    @dwt

    @bobbui Could you pehaps close this issue?

    As this project is quite usefull, would you be willing to share repsonsibility for closing issues with more persons? It seems maybe @donbowman and me (@dwt) for example might be willing to help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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