From 70f319051159963f6db83266cecced523dd27d2a Mon Sep 17 00:00:00 2001 From: spicefather <25182947+spicefather@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:54:38 -0500 Subject: [PATCH] Fixed parsing datetimes with timezone not specified. --- calibre-plugin/libby/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calibre-plugin/libby/client.py b/calibre-plugin/libby/client.py index a5f639e..fad58a2 100644 --- a/calibre-plugin/libby/client.py +++ b/calibre-plugin/libby/client.py @@ -323,6 +323,8 @@ def parse_datetime(value: str) -> Optional[datetime]: # type: ignore[return] "%Y-%m-%dT%H:%M:%S.%fZ", "%Y-%m-%dT%H:%M:%S%z", "%Y-%m-%dT%H:%M:%S.%f%z", + "%Y-%m-%dT%H:%M:%S", + "%Y-%m-%dT%H:%M:%S.%f", "%m/%d/%Y", # publishDateText ) for i, fmt in enumerate(formats, start=1):