localtime

Example: Converting Time to Local TimeDate and Time Functions

Converts the calendar time into local time.

struct tm *localtime( const time_t *calTime);

calTimeThe name of the value for the calendar time.

Under Linux, localtime is not thread-safe. Use localtime_r, instead. Refer to your platform-specific documentation for details.

Return Values

A pointer to a tm structure.