We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
utcfromtimestamp
1 parent cfab2b4 commit 2099494Copy full SHA for 2099494
tests/test_client.py
@@ -587,7 +587,12 @@ def test_transform_data(self):
587
now = datetime.datetime.fromtimestamp(timestamp).replace(
588
microsecond=0, tzinfo=SG_TIMEZONE.local
589
)
590
- utc_now = datetime.datetime.utcfromtimestamp(timestamp).replace(microsecond=0)
+ utc_now = (
591
+ datetime.datetime.fromtimestamp(timestamp, tz=datetime.timezone.utc)
592
+ .replace(microsecond=0)
593
+ .astimezone(None)
594
+ .replace(tzinfo=None)
595
+ )
596
local = {"date": now.strftime("%Y-%m-%d"), "datetime": now, "time": now.time()}
597
# date will still be the local date, because they are not transformed
598
utc = {
0 commit comments