How to convert time.gmtime () - like a tuple to UNIX time?

time.mktime called reverse time localtime.

Where is the reverse side of .gmtime time? You need to convert the result of email.utils.parsedate to normal UNIX time.

The only approximation is cracked as follows:

time.mktime(email.utils.parsedate(smth)) - time.altzone

How to do it right?

+3
source share
1 answer
+5
source

All Articles