Guardian Native C Library Calls Reference Manual (G06.25+, H06.03+)

Guardian Native C Library Calls (g - i) getdate(3)
When the input string contains no hour, no minutes, and no seconds, the getdate() func-
tion assumes the current hour, minute, and second.
When the input string contains no date, the getdate( ) function assumes today if the given
hour is greater than the current hour and assumes tomorrow if it is less.
NOTES
The getdate() function uses the getdate_err external variable to return error values.
The getdate() function can be called by native processes only.
RETURN VALUES
On successful completion, the getdate() function returns a pointer to a struct tm which contains
the date/time information from the input string converted to the internal time format. Otherwise,
it returns a null pointer and sets the getdate_err variable to indicate the error.
ERRORS
If any of the following conditions occur, the getdate() function sets the getdate_err variable to
the corresponding value:
1 The DATEMSK environment variable was null or undened.
2 The template le could not be opened for reading.
3 File status information could not be obtained.
4 The template le was not a regular le.
5 An error was encountered while reading the template le.
6 Memory allocation failed (not enough memory available).
7 The template le did not contain a line that matches the input string.
8 The input string contained invalid data.
FILES
DATEMSK Is an environment variable whose value is the full pathname of a template le. A
template le is a text le consisting of a series of lines, each of which denes an
acceptable date/time format using the eld descriptors outlined in the
DESCRIPTION section.
STANDARDS CONFORMANCE
The getdate() function is dened in the XPG4 Version 2 specication.
527192-003 Hewlett-Packard Company 315