mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 07:17:52 +10:00
rename datetime fields to _at, massively improve ABID generation safety and determinism
This commit is contained in:
@@ -200,7 +200,7 @@ def parse_date(date: Any) -> Optional[datetime]:
|
||||
date = str(date)
|
||||
|
||||
if isinstance(date, str):
|
||||
return dateparser(date, settings={'TIMEZONE': 'UTC'}).replace(tzinfo=timezone.utc)
|
||||
return dateparser(date, settings={'TIMEZONE': 'UTC'}).astimezone(timezone.utc)
|
||||
|
||||
raise ValueError('Tried to parse invalid date! {}'.format(date))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user