struct tm * localtime ( const time_t * timer );
Convert time_t value to tm structure as local time.
Converts timer to tm structure adjusting to the local time zone.
A pointer to a tm structure.
This structure is statically allocated and shared by gmtime, localtime and ctime functions. Each time one of these functions is called the content of the structure is overwritten.
Defined in ANSI-C.
/* localtime example */
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf ( "Current date and time are: %s", asctime (timeinfo) );
Current date and time are: Sat May 20 17:36:17 2000
asctime, ctime, localtime, mktime, time