You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we use freeze_time() with argument: tz_offset,
the datetime that is created by datetime.now() with the argument: tz was shifted as same as tz_offset
against the datetime that is created by datetime.now() without the argument: tz:
Correct specification
In nature, the datetime that is created by
datetime.now()
will be same timestamp even if we set any differenttz
argument:cf: The specification of
datetime.datetime.timestamp()
:datetime — Basic date and time types — Python 3.12.4 documentation
Bug details
When we use
freeze_time()
with argument:tz_offset
,the datetime that is created by
datetime.now()
with the argument:tz
was shifted as same astz_offset
against the datetime that is created by datetime.now() without the argument:
tz
:In case when we don't set
tz_offset
, there wasn't any problems.:these tests seems to work fine with any local timezone.
Tested version:
Python: 3.12.4
freezegun: 1.5.1
Related?:
freeze_time
could accept a timezone argument #87The text was updated successfully, but these errors were encountered: