I don't think TSV files are in UTC after all

This commit is contained in:
2023-05-31 22:27:09 -04:00
parent a3bf9b0081
commit bcf2b9d1ea

View File

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