Skip to content

datetime.UTC not in py3.10? #298

@pvgenuchten

Description

@pvgenuchten

seems #288 introduced datetime.UTC, which seems not available in py3.10
for backwards compat should we change to:

from datetime import datetime, timezone

utc = getattr(datetime, "UTC", timezone.utc)
today_and_now = datetime.now(utc)

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