C Programming/time.h/localtime

is a library function in. It converts calendar time into local time.

Syntax
Parameters:

The pointer 'ptr_time' is a pointer to a 'time_t' object that contains a calendar time.

Return Value:

The function localtime returns a pointer to a tm structure. The tm structure contains the time information.

Explanation
The function localtime uses the time pointed by the pointer ptr_time to fill a tm structure with the values that represent the corresponding local time. If this function is called, it returns the localtime in the form

"day Month date hr:min:sec year"((Output)).