February 2006
Intermediate to advanced
648 pages
14h 53m
English
The time module provides various time-related functions. In Python, time is measured as the number of seconds since the “epoch.” The epoch is the beginning of time (the point at which time = 0 seconds). The epoch is January 1, 1970 on UNIX and can be determined by calling time.gmtime(0) on other systems.
The following variables are defined:
accept2dyearA Boolean value that indicates whether two-digit years are accepted. Normally this is True, but it’s set to False if the environment variable $PYTHONY2K is set to a non-empty string. The value can be changed manually as well.
altzoneThe time zone used during daylight saving time (DST), if applicable.
daylightIs set to a nonzero value if a DST time zone has been defined.
timezoneThe local ...
Read now
Unlock full access