1
0
Fork 0

Fix json export date parsing

The format string for `datetime.strptime` did not match the example line in the comment below, since `%z` matches ["UTC offset in the form ±HHMM"](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior).
This commit is contained in:
t-mw 2019-05-18 22:32:09 +02:00 committed by GitHub
parent de28748109
commit 78bc52abf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ def parse_json_export(json_file):
json_file.seek(0)
links = json.load(json_file)
json_date = lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%S%z')
json_date = lambda s: datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')
for link in links:
# example line