Skip to content

Commit b3a9b73

Browse files
authored
Merge pull request #1546 from geofabrik/support-older-python-versions
support older versions of python with osm2pgsql-replication
2 parents c2b54e2 + d2ed429 commit b3a9b73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/osm2pgsql-replication

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def compute_database_date(conn, prefix):
7777
LOG.debug("Found timestamp %s", date)
7878

7979
try:
80-
date = dt.datetime.fromisoformat(date.replace('Z', '+00:00'))
80+
date = dt.datetime.strptime(date, '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=dt.timezone.utc)
8181
except ValueError:
8282
LOG.fatal("Cannot parse timestamp '%s'", date)
8383
return None

0 commit comments

Comments
 (0)