Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (s) strptime(3)
NAME
strptime - Converts a character string to a time value
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 *strptime(
const char *buf,
const char *format,
struct tm *tm);
PARAMETERS
buf Contains the character string to be converted by the strptime() function.
format Specifies the format of the string to be converted by the strptime() function.
tm Specifies the structure to contain the output of the strptime() function.
DESCRIPTION
The strptime() function converts the characters in the buf parameter to values that are stored in
the tm structure, using the format specified by the format parameter. The strptime( ) function
modifies only the fields in the tm structure that have corresponding conversion specifications in
the format.
The format parameter can contain zero or more of the following items:
• A conversion specification that directs the conversion of the next input field. Conversion
specifications start with a % (percent sign).
• Any white space character (as determined by the isspace() function) that matches 0
(zero) or more white space characters in the input stream.
• Any character except % (percent sign) or a white space character that must match the
next character in the input stream. If the character read from the input stream is different
from the character in the format parameter, the function stops processing the input
stream and returns a null pointer.
The application must ensure that there are whitespace or other non-alphanumeric characters
between any two conversion specifications.
The following conversion specifications are supported:
a Inputs day of the week, using the locale-dependent weekday name. The abbrevi-
ated or full name may be specified.
A Same as a.
b Inputs the month, using the locale-dependent month name. The abbreviated or
full name may be specified.
527192-018 Hewlett-Packard Company 6−113