преобразование даты и времени (date and time conversion)
Использование в приложениях (Application usage)
Several ``equivalent to'' formats and the special processing of
white-space characters are provided in order to ease the use of
identical format strings for strftime() and strptime().
It should be noted that dates constructed by the strftime()
function with the %Y
or %C%y
conversion specifiers may have
values larger than 9999. If the strptime() function is used to
read such values using %C%y
or %Y
, the year values will be
truncated to four digits. Applications should use %+
w%y
or %+
xY
with w and x set large enough to contain the full value of any
years that will be printed or scanned.
See also the APPLICATION USAGE section in strftime(3p).
It is unspecified whether multiple calls to strptime() using the
same tm
structure will update the current contents of the
structure or overwrite all contents of the structure. Conforming
applications should make a single call to strptime() with a
format and all data needed to completely specify the date and
time being converted.