From 6d92784dbb9dc1cfe4e9124d54d04ed56b3e44f9 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 30 Mar 2019 17:51:23 -0400 Subject: [PATCH] add docstring about timestamp parsing --- archivebox/util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archivebox/util.py b/archivebox/util.py index 487cfeab..c47741d5 100644 --- a/archivebox/util.py +++ b/archivebox/util.py @@ -368,6 +368,11 @@ def parse_date(date: Any) -> Optional[datetime]: if isinstance(date, str): if date.replace('.', '').isdigit(): + # this is a brittle attempt at unix timestamp parsing (which is + # notoriously hard to do). It may lead to dates being off by + # anything from hours to decades, depending on which app, OS, + # and sytem time configuration was used for the original timestamp + # more info: https://github.com/pirate/ArchiveBox/issues/119 timestamp = float(date) EARLIEST_POSSIBLE = 473403600.0 # 1985