Closed biochimia closed 4 years ago
datetime.utcnow() returns an instance with no timezone information, and calling timestamp() on it applies a local to UTC conversion again. time.time() returns a unix timestamp directly, so there's no need to deal with UTC or timezone offsets.
More elegant indeed, thanks!
As it's a very minor tweak I will include it in the next release, which is not planned yet.
datetime.utcnow() returns an instance with no timezone information, and calling timestamp() on it applies a local to UTC conversion again. time.time() returns a unix timestamp directly, so there's no need to deal with UTC or timezone offsets.