view roundup/anypy/datetime_.py @ 8064:d6b447de4f59

docs: set up for release documentation. Make changes to publish security.html with CVE announcements referring to the sections in upgrading.html rather than CVE.html. Remove templates.zip as part of html build in Makefile. Also update doc for using CVE.html.
author John Rouillard <rouilj@ieee.org>
date Tue, 09 Jul 2024 09:34:13 -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/