Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-199
strftime
strftime
The strftime function writes characters into the array pointed to by s under the direction
of the format string pointed to by format. At most maxsize characters are written. If
more than maxsize characters are required, the function returns zero and the contents of s
is indeterminate; otherwise the length of s is returned, not counting the null terminator.
The format string consists of ordinary characters and conversion specifiers that
determine how values from the broken down time in the structure pointed to by timeptr
are to be written.
s
points to the character array into which the strftime function writes the characters.
maxsize
specifies the maximum number of characters that the strftime function is allowed to
write into the array. This maximum number must include a terminating null
character.
format
points to a string that consists of zero or more conversion specifiers.
timeptr
points to the structure that contains the broken down time. This structure must be of
type struct tm.
#include <timeh>
size_t strftime(char *s, size_t maxsize, const char *format,
const struct tm *timeptr);