time.mktime(t)
This is the inverse function of localtime()
. Its argument is the struct_time
or full 9-tuple (since the dst flag is needed; use -1
as the dst flag if it is unknown) which expresses the time in local time, not UTC. It returns a floating point number, for compatibility with time()
. If the input value cannot be represented as a valid time, either OverflowError
or ValueError
will be raised (which depends on whether the invalid value is caught by Python or the underlying C libraries). The earliest date for which it can generate a time is platform-dependent.
Please login to continue.