Skip to content

using UTC timezone singleton instead of datetime.UTC alias #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

gyts
Copy link

@gyts gyts commented Jul 28, 2025

datetime.UTC introduced only since 3.11https://docs.python.org/3.11/library/datetime.html#datetime.UTC

Fixing it for [3.7 - 3.11) versions

Python 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.UTC
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'datetime' has no attribute 'UTC'

@lonvia lonvia merged commit 0b216de into osmcode:master Jul 28, 2025
22 checks passed
@lonvia
Copy link
Member

lonvia commented Jul 28, 2025

Thanks.

We really need more tests there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants