From bcf2b9d1ea44d7a216c4919d22c51cfe05664d7c Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 31 May 2023 22:27:09 -0400 Subject: [PATCH] I don't think TSV files are in UTC after all --- vrobbler/apps/scrobbles/tsv.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vrobbler/apps/scrobbles/tsv.py b/vrobbler/apps/scrobbles/tsv.py index 64f84bc..b432706 100644 --- a/vrobbler/apps/scrobbles/tsv.py +++ b/vrobbler/apps/scrobbles/tsv.py @@ -65,11 +65,9 @@ def process_audioscrobbler_tsv_file(file_path, user_id, user_tz=None): ) continue - timestamp = ( - datetime.utcfromtimestamp(int(row[AsTsvColumn["TIMESTAMP"].value])) - .replace(tzinfo=user_tz) - .astimezone(pytz.utc) - ) + timestamp = datetime.utcfromtimestamp( + int(row[AsTsvColumn["TIMESTAMP"].value]) + ).replace(tzinfo=user_tz) new_scrobble = Scrobble( user_id=user_id,