view roundup/anypy/datetime_.py @ 7919:e3b34d02c61a

doc: add html versions of man pages Also a minor change to prep for future inclusion of a generated version of config.ini in reference document. This would replace the incomplete description that is there.
author John Rouillard <rouilj@ieee.org>
date Mon, 29 Apr 2024 01:29:07 -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/