fix crash on python upgrade due to lazy import

This commit is contained in:
JerryXiao 2024-04-28 18:06:33 +08:00
parent f44f86e124
commit 166d0fced2
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5

View file

@ -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)