Skip to content

datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version #521

Open
@aknopper

Description

@aknopper

It looks to be called directly in these files

/.venv/lib64/python3.12/site-packages/flask_monitoringdashboard/core/timezone.py:13: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
return dt + config.timezone.utcoffset(datetime.datetime.utcnow())

/.venv/lib64/python3.12/site-packages/flask_monitoringdashboard/core/cache.py:80: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
memory_cache.get(endpoint_name).set_last_requested(datetime.datetime.utcnow())

Metadata

Metadata

Assignees

No one assigned

    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