Python time altzone() method
Python Time altzone() Method
Description
The altzone() method is a property of the time module. If a local DST time zone is defined, it returns the offset of the local DST time zone from UTC (in seconds). If the local DST time zone is east of UTC (as in Western Europe, including the United Kingdom), this value will be negative. This method is only used if Daylight Saving Time is non-zero.
Syntax
The syntax of the altzone() method is as follows:
time.altzone
Parameters
NA
Return Value
If a local DST time zone is defined, this method returns the offset of the local DST time zone from UTC (in seconds).
Example
The following example shows the usage of the altzone() method.
import time
print ("time.altzone: ", time.altzone)
When we run the above program, it produces the following output:
time.altzone: -23400