Make tz-aware datetime of the epoch with stdlib

This commit is contained in:
Alex Dempsey 2025-03-04 13:51:07 -08:00
parent 6ca1a62489
commit 8c2493715c

View File

@ -321,10 +321,9 @@ def _remove_query(url):
# XXX chop off path after last slash??
site_surt_canon = urlcanon.Canonicalizer(urlcanon.semantic.steps + [_remove_query])
import doublethink
import datetime
EPOCH_UTC = datetime.datetime.utcfromtimestamp(0.0).replace(tzinfo=doublethink.UTC)
EPOCH_UTC = datetime.datetime.fromtimestamp(0.0, tz=datetime.timezone.utc)
# we could make this configurable if there's a good reason
MAX_PAGE_FAILURES = 3