Skip to content

Commit 0b216de

Browse files
authored
Merge pull request #297 from gyts/datetime-now-fix-for-<3.11
using UTC timezone singleton instead of datetime.UTC alias
2 parents 04918fc + d1d742e commit 0b216de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pyosmium-up-to-date

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def update_from_custom_server(url, seq, ts, options):
9898
ts = ts.timestamp
9999

100100
if not options.force_update:
101-
cmpdate = dt.datetime.now(dt.UTC) - dt.timedelta(days=90)
101+
cmpdate = dt.datetime.now(dt.timezone.utc) - dt.timedelta(days=90)
102102
cmpdate = cmpdate.replace(tzinfo=dt.timezone.utc)
103103
if ts < cmpdate:
104104
log.error(

0 commit comments

Comments
 (0)