view roundup/anypy/datetime_.py @ 8298:cfa7d43a3658

backout bbc99def147a. All the other backends were programmed to accomodate the skip one nature of postgres sequences
author John Rouillard <rouilj@ieee.org>
date Mon, 20 Jan 2025 16:32:39 -0500
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/