# Include <time. h>
Time_t time (time_t * calptr)
This is a string of numbers pointed to by the Basic Framework pointer of the time function in milliseconds.
Use the following two functions to convert the Standard Time
# Include <time. h>
Struct TM * gmtime (const time_t * calptr)/* convert it to an international standard time */
Struct TM * localtime (const time_t * calptr)/* convert it to the local time */
The above two functions return a pointer of the TM structure.
The TM structure is as follows:
Struct TM {
Int tm_sec;/* [0, 6] */
Int tm_min;/* [0, 59] */
Int tm_hour;/* [0, 23] */
Int tm_mday;/* [1, 31] */
Int tm_mon;/* [0, 11] */
Int tm_year;/* year since 1900 */
Int tm_wday;/* day since Sunday [0, 6] */
Int tm_yday;/* day cince January 1; [0,365] */
Int tm_isdst;/* Daylight Saving Time flag: <0, 0,> 0 */
}
After obtaining this structure, use the corresponding domain value in the structure to obtain the time.
Note: The year is calculated from 1900, and the corresponding year must be added.