Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
gmtime_r(3) Guardian Native C Library Calls Reference Manual
NAME
gmtime_r - Converts time since the Epoch to broken-down Coordinated Universal Time (reen-
trant)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes that do not use Standard POSIX Threads:
/G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes that do not use Standard POSIX Threads:
/G/system/zdllnnn/ycredll
H-series and J-series OSS processes that use the Standard POSIX Threads library:
/G/system/zdllnnn/zsptdll
SYNOPSIS
#include <time.h> | #include <spthread.h>
/* time.h is required for H-series and J-series processes that do not use */
/* the Standard POSIX Threads library */
/* spthread.h is required for G-series native OSS processes, and for H-series */
/* and J-series OSS processes that use the Standard POSIX Threads library */
struct tm *gmtime_r(
const time_t *timer,
struct tm *result);
PARAMETERS
timer Points to a variable that specifies a time value in seconds.
result Points to the tm structure where the converted time is stored.
DESCRIPTION
The gmtime_r() function is the reentrant version of the gmtime() function.
The gmtime_r() function converts the time in seconds since the Epoch, in a variable pointed to
by the timer parameter, into broken-down time, expressed as Coordinated Universal Time
(UTC). The broken-down time is stored in the type tm structure pointed to by result, and
gmtime_r() returns a pointer to that structure. The tm structure is defined in the time.h header
file.
NOTES
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
If you are NOT using the Standard POSIX Threads library (this is not a threaded application or
you are using the POSIX User Thread Model library), you must:
• Include the time.h file
To use the Standard POSIX Threads library, you must:
• Include the spthread.h file
• Link your application to the Standard POSIX Threads library:
/G/system/sysnn/zsptsrl (G-series)
or
/G/system/zdllnnn/zsptdll (H-series or J-series)
3−78 Hewlett-Packard Company 527192-018