Skip to content

Retire/update the datetime.utcnow() function #4240

@shuchu

Description

@shuchu

Expected Behavior

Current Behavior

Steps to reproduce

Specifications

Based on the Release Note of Python3.12

datetime: 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 gh-103857.)

  • Version: 0.38
  • Platform:
  • Subsystem:

Possible Solution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions