HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
s
strptime(3C) strptime(3C)
January 19 03:14:07 UTC, 2038) or if the date exceeds the maximum date supported in 64-bit HP-UX
(which is Friday December 31 23:59:59 UTC, 9999), strptime() fails and a null pointer is returned.
EXTERNAL INFLUENCES
Locale
The LC_NUMERIC category may define the alternative symbols (alt_digit—see localedef(4)) used by the
%O modifier. The alt_digit definition has precedence over alt_digits (LC_TIME). Support for alt_digit may
be removed in a future release of HP-UX.
The LC_TIME category determines the characters to be interpreted for those directives described above as
being from the locale.
The LC_CTYPE category determines the interpretation of the bytes within format as single and/or multi-
byte characters.
International Code Set Support
Single- and multi-byte character code sets are supported.
APPLICATION USAGE
strptime() is thread-safe. It is not async-cancel-safe.
RETURN VALUE
Upon successful completion, strptime() returns a pointer to the character following the last character
parsed. Otherwise, a null pointer is returned.
EXAMPLES
The following program segment uses strptime() to convert the string (first argument) to values accord-
ing to the format specified in the second argument.
struct tm t;
setlocale(LC_TIME, "en_US.iso88591");
strptime("1:04:23 PM on 10/6/92", "%I:%M:%S %p on %D", &t);
The converted value is stored in the structure t as follows:
t.tm_sec = 23
t.tm_min = 4
t.tm_hour = 13
t.tm_mday = 6
t.tm_mon = 9
t.tm_year = 92
t.tm_wday = 2
t.tm_yday = 279
t.tm_isdst = 1
AUTHOR
strptime() was developed by OSF and HP.
SEE ALSO
scanf(3S), strftime(3C), getdate(3C), ctime(3C), setlocale(3C).
STANDARDS COMPLIANCE
strptime: XPG4
HP-UX Release 11i: December 2000 − 3 − Section 3−−893
___
___