getdate.3c (2010 09)
g
getdate(3C) getdate(3C)
Line in
Input Template Date
Mon %a Mon Sep 22 12:19:47 EDT 1986
Sun %a Sun Sep 28 12:19:47 EDT 1986
Fri %a Fri Sep 26 12:19:47 EDT 1986
September %B Mon Sep 1 12:19:47 EDT 1986
January %B Thu Jan 1 12:19:47 EST 1987
December %B Mon Dec 1 12:19:47 EST 1986
Sep Mon %b %a Mon Sep 1 12:19:47 EDT 1986
Jan Fri %b %a Fri Jan 2 12:19:47 EST 1987
Dec Mon %b %a Mon Dec 1 12:19:47 EST 1986
Jan Wed 1989 %b %a %Y Wed Jan 4 12:19:47 EST 1989
Fri 9 %a %H Fri Sep 26 09:00:00 EDT 1986
Feb 10:30 %b %H:%S Sun Feb 1 10:30:00 EST 1987
10:30 %H:%M Tue Sep 23 10:30:00 EDT 1986
13:30 %H:%M Mon Sep 22 13:30:00 EDT 1986
Obsolescent Interface
getdate_r() converts user format date and time. Also see the WARNINGS section.
ERRORS
Upon failure,
getdate() returns NULL and the symbol getdate_err is set to indicate the error.
The following is a complete list of the
getdate_err settings and their interpretation:
1 the DATEMSK environment variable is null or undefined,
2 the template file cannot be opened for reading,
3 failed to get file status information,
4 the template file is not a regular file,
5 an error is encountered while reading the template file,
6 memory allocation failed (not enough memory available),
7 there is no line in the template that matches the input,
8 invalid input specification. For example, February 31; or the time specified cannot be
represented in the time_t data type in 32-bit HP-UX (which represents Tuesday January 19
03:14:07 UTC, 2038) or exceeds the maximum date supported in 64-bit HP-UX (which is Friday
December 31 23:59:59 UTC, 9999).
WARNINGS
The return value for
getdate() points to data whose content is overwritten by each call by the same
thread.
getdate_r() is an obsolescent interface supported only for compatibility with existing DCE applica-
tions. New multi-threaded applications should use getdate().
SEE ALSO
ctime(3C), ctype(3C), setlocale(3C), strftime(3C), thread_safety(5).
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3