From 166d0fced27200f11384bda4e62390a7eefbe3a8 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 28 Apr 2024 18:06:33 +0800 Subject: [PATCH] fix crash on python upgrade due to lazy import --- src/pacroller/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pacroller/utils.py b/src/pacroller/utils.py index bf0acf3..c152410 100644 --- a/src/pacroller/utils.py +++ b/src/pacroller/utils.py @@ -135,6 +135,7 @@ def pacman_time_to_timestamp(stime: str) -> int: ''' the format pacman is using seems to be not iso compatible ''' dt = datetime.strptime(stime, "%Y-%m-%dT%H:%M:%S%z") return mktime(dt.astimezone().timetuple()) +pacman_time_to_timestamp('2024-01-01T00:00:00+0000') def back_readline(fp: BinaryIO) -> Iterator[str]: pos = fp.seek(0, 2)