Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (j - m) localtime(3)
NAME
localtime - Converts time since the Epoch to broken-down local time
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <time.h>
struct tm *localtime(
const time_t *timer);
PARAMETERS
timer Points to a variable that specifies a time value in seconds.
DESCRIPTION
The localtime() function converts the time in seconds since the Epoch, in a variable pointed to
by the timer parameter, into broken-down time, expressed as local time. This function corrects
for the timezone and any seasonal time adjustments. Broken-down time is stored in the type tm
structure pointed to by the return value of this function.
The tm structure is defined in the time.h header file.
Local timezone information is set as though the tzset() function were called.
RETURN VALUES
Upon successful completion, the localtime() function returns a pointer to a type tm broken-
down time structure, which contains converted local time information. The return value might
point to static storage, which might be overwritten by subsequent calls to any of the following
functions:
asctime()
ctime()
localtime()
gmtime()
Values for the timeptr->tm_wday and timeptr->tm_yday members of the structure are set, and
the other members are set to specified local times. The final value of timeptr->tm_mday is not
set until the values of members timeptr->tm_mon and timeptr->tm_year are determined.
The values set in the tm structure are affected by the setting of the TZ environment variable and
calls to the tzset( ) function. Refer to the tzset(3) reference page for more information about the
TZ environment variable.
ERRORS
No error values are returned. This function does not set errno.
RELATED INFORMATION
Functions: asctime(3), ctime(3), difftime(3), getenv(3), gmtime(3), mktime(3), strftime(3),
time(3), tzset(3), utime(3).
STANDARDS CONFORMANCE
The return of a null pointer to indicate an error is an HP extension to the XPG4 Version 2
specification.
527192-018 Hewlett-Packard Company 441