mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 22:54:27 -04:00
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:
parent
de28748109
commit
78bc52abf2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue