Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

gmtime(3) OSS Library Calls Reference Manual
NAME
gmtime - Converts time since the Epoch to broken-down Coordinated Universal 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 *gmtime(
const time_t *timer);
PARAMETERS
timer Points to a variable that specifies a time value in seconds.
DESCRIPTION
The gmtime( ) function converts the time in seconds since the Epoch, in a variable pointed to by
the timer parameter, into broken-down time, expressed as UTC (Coordinated Universal Time).
Broken-down time is stored in the type tm structure pointed to by the return value of the
gmtime( ) function. The tm structure is defined in the time.h header file.
RETURN VALUES
Upon successful completion, the gmtime( ) function returns a pointer to a type tm broken-down
time structure, which contains converted UTC 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 times since the Epoch. The final value of
timeptr->tm_mday is not set until the values of members timeptr->tm_mon and
timeptr->tm_year are determined.
When an error occurs or UTC is not available, this function returns a null pointer.
Note that the tm_isdst field of the tm structure is always set to 0 (zero) by a call to the gmtime( )
function.
ERRORS
No error values are returned. This function does not set errno.
RELATED INFORMATION
Functions: asctime(3), ctime(3), difftime(3), getenv(3), localtime(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.
3166 Hewlett-Packard Company 527187-017