Page 105 -
P. 105
find the time
These are some of the functions provided by Python’s built-in time library:
Python Library Documentation: time
time.clock()
The current time in seconds, given as a floating
point number.
time.daylight()
This returns 0 if you are not currently in
Daylight Savings Time.
time.gmtime()
Tells you current UTC date and time (not affected
by the timezone).
time.localtime()
Tells you the current local time (is affected by
your timezone).
time.sleep(secs)
Don’t do anything for the specified number of
seconds.
time.time()
Tells you the number of seconds since January 1st,
1970.
time.timezone()
Tells you the number of hours difference between
your timezone and the UTC timezone (London).
You need to use one of these functions to help you fix your code.
But which one? Draw a circle around the function you think you might need.
70 Chapter 2