Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

getdate(3) Guardian Native C Library Calls Reference Manual
%p Matches the equivalent of AM or PM in the current locale.
%R Matches an appropriate representation of time for the current locale. In the
POSIX locale, this is the same as %H%M.
%r Matches an appropriate representation of time in the current locale
s equivalent
of AM/PM notation. In the POSIX locale, this is the same as %I%M%S%p.
%S Matches the seconds (00 to 61). Note that there is an allowance for two leap
seconds.
%T Matches a time in the 24-hour representation. This is the same as
%H : %M :
%S.
%t Matches a tab character.
%w Matches a weekday number, with Sunday being 0 and Saturday being 6.
%X Matches an appropriate time representation for the current locale.
%x Matches an appropriate date representation for the current locale.
%Y Matches a four-digit year.
%y Matches a year within a century (00-99)
%Z Matches a time zone name or no characters if not time zone exists. If the time
zone matched by %Z is not the one that the getdate() function expects, an error
results. The getdate() function calculates an expected time zone based on the
information supplied to it (such as the hour, day, and month).
%% Matches a percent-sign character.
When matching the input string with a template, the match is case insensitive. Weekday and
month names can contain any combination of upper and lower case letters, but setting the
LC_TIME category might require them to be in a specic language.
For eld descriptors that can match leading zeroes, the leading zeroes are optional; however,
these descriptors will match no more than two digits including leading zeroes.
The %c, %X, and %x descriptors are not supported if they contain unsupported eld descrip-
tors.
The getdate() function uses the following rules when converting the input string into the internal
time format:
When a eld matching the %Z descriptor is being scanned, the time in the internal for-
mat is initialized to the current time in the scanned time zone. Otherwise, this time is ini-
tialized based on the current local time as though the localtime() function had been
called.
When the input string consists of only a weekday, the getdate( ) function assumes today
if the given day is equal to the current day and next week if it is less.
When the input string consists of only a month, the getdate() function assumes the
current month if the given month is equal to the current month and next year if it is less
and no year is given (the rst day of the month is assumed if no day is given).
314 Hewlett-Packard Company 527192-005