Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
strptime(3) Guardian Native C Library Calls Reference Manual
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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
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 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.
B Same as b.
6−72 Hewlett-Packard Company 527192-005