C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
localtime
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The localtime function converts a time stored in an object of
     type time_t to a structure. The long value <timer> represents the
     seconds elapsed since midnight (00:00:00), December 31, 1899,
     Universal Coordinated Time. This value is usually obtained from the
     time function.
 
     The localtime function breaks down the <timer> value, corrects for
     the local time zone and daylight saving time if appropriate, and
     stores the corrected time in a structure of type tm.
     See: tm
 
     Note that the gmtime, mktime, and localtime functions use a single
     statically allocated buffer for the conversion. Each call to one
     of these routines destroys the result of the previous call.
 
     The localtime function makes corrections for the local time zone
     if the user first sets the environment variable TZ. When TZ is
     set, three other environment variables (_timezone, _daylight, and
     _tzname) are automatically set as well. See the _tzset function
     for a description of these variables.
 
     The TZ variable is not part of the ANSI standard definition of
     localtime, but is a Microsoft extension.
 
     Return Value
 
     The localtime function returns a pointer to the structure result.
     If <timer> represents a date prior to midnight, December 31, 1899,
     the function returns NULL.
                                    -♦-