Go to the first, previous, next, last section, table of contents.

localtime---convert time to local representation

Synopsis
#include <time.h>
struct tm *localtime(time_t *timep);

Description
localtime converts the time at timep into local time, then converts its representation from the arithmetic representation to the traditional representation defined by struct tm.

localtime constructs the traditional time representation in static storage; each call to gmtime or localtime will overwrite the information generated by previous calls to either function.

mktime is the inverse of localtime.


Returns
A pointer to the traditional time representation (struct tm).


Portability
ANSI C requires localtime.

localtime requires no supporting OS subroutines.



Go to the first, previous, next, last section, table of contents.