Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (a - e) asctime(3)
NAME
asctime - Converts broken-down time 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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <time.h>
char *asctime(
const struct tm *timeptr );
PARAMETERS
timeptr Points to a type tm structure that contains the broken-down time.
DESCRIPTION
The asctime(), ctime(), difftime( ), gmtime(), localtime(), mktime(), and tzset() functions are
used to convert time units to strings, to store converted time units for subsequent processing, and
to convert stored time information to other time units. Time information used in these functions
is stored in a type tm structure, which is dened in the time.h header le.
The asctime() function converts broken-down time information in a type tm structure pointed to
by the timeptr parameter to a date and time string with the following 26-byte format:
Sun Sep 16 01:03:52 1973\n\0
This format contains 5 elds and is terminated by a newline and a 0 (zero) byte.
RETURN VALUES
Upon successful completion, the asctime() function returns a pointer to a character string that
expresses the date and time in a xed 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()
On error, this function returns a null pointer.
ERRORS
No error values are returned. This function does not set errno.
RELATED INFORMATION
Functions: ctime(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
specication.
527192-007 Hewlett-Packard Company 113