Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

getdate(3) OSS Library Calls Reference Manual
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 undefined.
2 The template file could not be opened for reading.
3 File status information could not be obtained.
4 The template file was not a regular file.
5 An error was encountered while reading the template file.
6 Memory allocation failed (not enough memory available).
7 The template file 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 file. A
template le is a text file consisting of a series of lines, each of which defines an
acceptable date/time format using the field descriptors outlined in the
DESCRIPTION section.
STANDARDS CONFORMANCE
The getdate( ) function is defined in the XPG4 Version 2 specification.
330 Hewlett-Packard Company 527187-017