Actually fix the TSV timezone issue

This commit is contained in:
2023-05-31 23:08:03 -04:00
parent bcf2b9d1ea
commit 0bf4d28482
3 changed files with 25 additions and 5 deletions

View File

@ -0,0 +1,12 @@
from datetime import datetime
import pytz
from django.contrib.auth import get_user_model
from vrobbler.apps.scrobbles.utils import timestamp_user_tz_to_utc
def test_timestamp_user_tz_to_utc():
timestamp = timestamp_user_tz_to_utc(
1685561082, pytz.timezone("US/Eastern")
)
assert timestamp == datetime(2023, 5, 31, 23, 24, 42, tzinfo=pytz.utc)