Converts a time value to local time.
#include <time.h> struct tm *localtime ( const time_t *calendar);
struct tm *localtime_r ( const time_t *calendar, struct tm *localtime);
(IN) Points to the time, in seconds since the epoch began, to convert into local time.
(OUT) Points to a tm structure for the converted time.
Returns a pointer to the tm structure containing the time information.
The localtime and localtime_r functions convert the time in seconds since the epoch began into a structure of time information expressed as local time. Local timezone information and any seasonal time adjustments are used in the conversion.
The structure returned is reused every time that localtime is called.
The localtime_r function provides the same functionality as localtime, but localtime_r is designed for use with reentrant NLM applications. The localtime_r function allows the caller to pass storage for the results rather than relying on per-thead data