The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

strptime (3)
  • strptime (3) ( Solaris man: Библиотечные вызовы )
  • >> strptime (3) ( FreeBSD man: Библиотечные вызовы )
  • strptime (3) ( Русские man: Библиотечные вызовы )
  • strptime (3) ( Linux man: Библиотечные вызовы )
  • strptime (3) ( POSIX man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    strptime
    
     - parse date and time string
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <time.h>
    char * Fo strptime Fa const char * restrict buf Fa const char * restrict format Fa struct tm * restrict timeptr Fc  

    DESCRIPTION

    The strptime ();
    function parses the string in the buffer Fa buf according to the string pointed to by Fa format , and fills in the elements of the structure pointed to by Fa timeptr . The resulting values will be relative to the local time zone. Thus, it can be considered the reverse operation of strftime(3).

    The Fa format string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer, where white space in the format string will match any amount of white space in the buffer. All conversion specifications are identical to those described in strftime(3).

    Two-digit year values, including formats Fa %y and Fa %D , are now interpreted as beginning at 1969 per POSIX requirements. Years 69-00 are interpreted in the 20th century (1969-2000), years 01-68 in the 21st century (2001-2068).

    If the Fa format string does not contain enough conversion specifications to completely specify the resulting Vt struct tm , the unspecified members of timeptr are left untouched. For example, if Fa format is ``%H:%M:%S '' only tm_hour tm_sec and tm_min will be modified. If time relative to today is desired, initialize the Fa timeptr structure with today's date before passing it to strptime (.);
     

    RETURN VALUES

    Upon successful completion, strptime ();
    returns the pointer to the first character in Fa buf that has not been required to satisfy the specified conversions in Fa format . It returns NULL if one of the conversions failed.  

    SEE ALSO

    date(1), scanf(3), strftime(3)  

    HISTORY

    The strptime ();
    function appeared in Fx 3.0 .  

    AUTHORS

    The strptime ();
    function has been contributed by Powerdog Industries.

    This man page was written by An J:org Wunsch .  

    BUGS

    Both the Fa %e and Fa %l format specifiers may incorrectly scan one too many digits if the intended values comprise only a single digit and that digit is followed immediately by another digit. Both specifiers accept zero-padded values, even though they are both defined as taking unpadded values.

    The Fa %p format specifier has no effect unless it is parsed after hour-related specifiers. Specifying Fa %l without Fa %p will produce undefined results. Note that 12AM (ante meridiem) is taken as midnight and 12PM (post meridiem) is taken as noon.

    The Fa %U and Fa %W format specifiers accept any value within the range 00 to 53 without validating against other values supplied (like month or day of the year, for example).

    The Fa %Z format specifier only accepts time zone abbreviations of the local time zone, or the value "GMT". This limitation is because of ambiguity due to of the over loading of time zone abbreviations. One such example is Fa EST which is both Eastern Standard Time and Eastern Australia Summer Time.

    The strptime ();
    function does not correctly handle multibyte characters in the Fa format argument.


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    SEE ALSO
    HISTORY
    AUTHORS
    BUGS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру