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
Use calendar.timegm instead of time.mktime for UTC timestamps
time.mktime() converts a time tuple in local time to seconds since the
Epoch, as stated in the docs:
> Convert a time tuple in local time to seconds since the Epoch.
> Note that mktime(gmtime(0)) will not generally return zero for most
> time zones; instead the returned value will either be equal to that
> of the timezone or altzone attributes on the time module.
calendar.timegm() is guaranteed to produce UTC timestamp:
> Unrelated but handy function to calculate Unix timestamp from GMT.
0 commit comments