We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The time.mktime function takes a local time argument and returns a timestamp, but it seems the system timezone is used over the tz_offset value.
time.mktime
tz_offset
# dt.py import freezegun, datetime, time with freezegun.freeze_time("1970-01-01 00:00:00"): timetuple = datetime.datetime.now().timetuple() print(timetuple) mktime = time.mktime(timetuple) print(mktime)
$ env TZ=UTC-1 python dt.py time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=1, tm_isdst=-1) -3600.0
The expected value of time.mktime is 0.
0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
time.mktime
function takes a local time argument and returns a timestamp, but it seems the system timezone is used over thetz_offset
value.The expected value of
time.mktime
is0
.The text was updated successfully, but these errors were encountered: