diff --git a/vrobbler/apps/books/koreader.py b/vrobbler/apps/books/koreader.py index 1058d8d..a9d0fad 100644 --- a/vrobbler/apps/books/koreader.py +++ b/vrobbler/apps/books/koreader.py @@ -298,6 +298,10 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl "page_data": scrobble_page_data, "pages_read": len(scrobble_page_data.keys()), } + if hasattr(timestamp.tzinfo, "tzname"): + tz = timestamp.tzinfo.tzname + if hasattr(timestamp.tzinfo, "name"): + tz = timestamp.tzinfo.name scrobbles_to_create.append( Scrobble( book_id=book_id, @@ -311,7 +315,7 @@ def build_scrobbles_from_book_map(book_map: dict, user: "User") -> list["Scrobbl in_progress=False, played_to_completion=True, long_play_complete=False, - timezone=timestamp.tzinfo.name, + timezone=tz, ) ) # Then start over