view roundup/anypy/datetime_.py @ 8316:e5720094a00e

fix: double escaping of data-calurl prevent use. data-calurl escaped the '&'s replacing them with the entity code. Then the value was processed again by cgi_escape_attrs double escaping the value making it unusable if passed to help_window().
author John Rouillard <rouilj@ieee.org>
date Sun, 11 May 2025 20:02:31 -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/