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

Guardian Native C Library Calls (a - e) ctime(3)
NAME
ctime - Converts time since the Epoch into a date and time string
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>
char *ctime(
const time_t *timer);
PARAMETERS
timer Points to a variable that specifies a time value in seconds.
DESCRIPTION
The ctime() function converts the time in seconds since the Epoch, pointed to by the timer
parameter, to a character string. The Epoch is taken as 00:00:00 UTC January 1, 1970. The char-
acter string specifies local time in the following 26-byte format:
Sun Sep 16 01:03:52 1973\n\0
This format contains 5 fields and is terminated by a newline and a 0 (zero) byte.
Local time-zone information is set as though the tzset( ) function were called. This function is
equivalent to asctime(localtime(timer)).
RETURN VALUES
Upon successful completion, the ctime() function returns a pointer to a character string that
expresses the date and time in a fixed format. 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()
The value returned is 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 environ-
ment variable.
On error, this function returns a null pointer.
ERRORS
No error values are returned. This function does not set errno.
RELATED INFORMATION
Functions: asctime(3), difftime(3), getenv(3), gmtime(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-018 Hewlett-Packard Company 1151