diff --git a/tests/test_client.py b/tests/test_client.py index e29c6158d..4a81996f1 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -587,7 +587,12 @@ def test_transform_data(self): now = datetime.datetime.fromtimestamp(timestamp).replace( microsecond=0, tzinfo=SG_TIMEZONE.local ) - utc_now = datetime.datetime.utcfromtimestamp(timestamp).replace(microsecond=0) + utc_now = ( + datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc) + .replace(microsecond=0) + .astimezone(None) + .replace(tzinfo=None) + ) local = {"date": now.strftime("%Y-%m-%d"), "datetime": now, "time": now.time()} # date will still be the local date, because they are not transformed utc = {