Import time
1. A class that represents time. The time range represented is from January 1, 1970 to January 19, 2038.
2, in Python, the way to represent time is: 1) Timestamp: timestamp
2) formatted string
3) Tuple: Struct_time
3. Function of Time
1) time.localtime ([secs]): Converts a timestamp to the struct_time of the current time zone. The secs parameter is empty, whichever is the current time.
The values of the properties (Attribute) are:
Months: 1-12; days: 1-31; hours: 0-23; points: 0-59; seconds: 0-61; week: 0-6;
Days (Tm_yday: The day of the year): 1-366, Summer season (TM_ISDST: Whether summer season): -1,0 (Default is-1)
2) Time.time (): Returns the current timestamp
3) time.mktime (TS): Converts a struct_time to timestamp
4) Time.asctiem ([ts]): A tuple or struct_time representing time is represented in this form: ' Sun June 20 14:34:09:2015 '.
If the argument is empty, the Time.localtime () is passed in as a parameter
5) Time.ctime ([psec]): Converts a timestamp (floating point calculated in seconds) to the form of time.asctime (), when the parameter is empty, the default Time.time () is the parameter, equivalent to Time.asctime ( Time.localtime (secs))
6) Time.strptime (str,fmt= '%a%b%d%h:%m%s%y '): Resolves a time string to a time tuple according to the format of the FMT
Python Time module