view roundup/anypy/datetime_.py @ 8351:e775cd258763

docs: fix canonical link for www.roundup-tracker.org index page the index page canonical link was: https://www...org/index.html change the template so the canonical is set to https://www...org/ as that is how it's listed by crawlers.
author John Rouillard <rouilj@ieee.org>
date Wed, 02 Jul 2025 12:26:21 -0400
parents d5d7ecd31864
children
line wrap: on
line source

# https://issues.roundup-tracker.org/issue2551278
# datetime.utcnow deprecated
try:
    from datetime import UTC, datetime

    def utcnow():
        return datetime.now(UTC)

except ImportError:
    from datetime import datetime

    def utcnow():
        return datetime.utcnow()

Roundup Issue Tracker: http://roundup-tracker.org/