Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (g - i) gmtime(3)
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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
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.
527192-005 Hewlett-Packard Company 3−47