We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
utcfromtimestamp
1 parent 6f3c8d7 commit 3364f43Copy full SHA for 3364f43
1 file changed
tests/test_client.py
@@ -579,7 +579,12 @@ def test_transform_data(self):
579
now = datetime.datetime.fromtimestamp(timestamp).replace(
580
microsecond=0, tzinfo=SG_TIMEZONE.local
581
)
582
- utc_now = datetime.datetime.utcfromtimestamp(timestamp).replace(microsecond=0)
+ utc_now = (
583
+ datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc)
584
+ .replace(microsecond=0)
585
+ .astimezone(None)
586
+ .replace(tzinfo=None)
587
+ )
588
local = {"date": now.strftime("%Y-%m-%d"), "datetime": now, "time": now.time()}
589
# date will still be the local date, because they are not transformed
590
utc = {
0 commit comments