HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1902 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1902.


Report 1902 Actions


    Problem Report Number 1902
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0221
    Raised 1998-01-19 08:00
    Updated 2003-03-13 08:00
    Published 1998-01-24 08:00
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.4.2
    Test Identification XPG4.os/time/strptime 3
    Specification System Interfaces and Headers Issue 5
    Location in Spec See Problem Text
    Linked Problem Reports PIN4.037, (in, old, system)
    Problem Summary PIN5.001 The above errors occur because the t_fmt_ampm string is set to "" in the source for VSX4L1 and VSX4L2. The XPG5 XBD on page 50 states the following: "In the event that some of the information for a lo...
    Problem Text

    The above errors occur because the t_fmt_ampm string is set
    to "" in the source for VSX4L1 and VSX4L2. The XPG5 XBD on page
    50 states the following:

    "In the event that some of the information for a locale category, as specified
    in this specification, is missing from the locale source definition, the
    behavior of that category, if it is referenced, is unspecified."

    This means the behavior of strptime(%r) using an undefined t_fmt_ampm
    string is unpredictable.
    Test Output
    ************************************************************************
    /tset/XPG4.os/time/strptime/T.strptime 3 Failed

    Test Description:
    If strptime() is supported:
    When format is a string made up of a series of the following field
    descriptors :
    a. d day of month - 01 to 31 (with or without leading zeros)
    b. D date in %m/%d/%y format
    c. H hour - 00 to 23 (with or without leading zeros)
    d. I hour - 00 to 12 (with or without leading zeros)
    e. j day of year - 001 to 366
    f. M minute - 00 to 59 (with or without leading zeros)
    g. m month of year - 01 to 12 (with or without leading zeros)
    h. n any whitespace character sequence
    i. r time in %I:%M:%S %p format
    j. S second - 00 to 61 (with or without leading zeros)
    k. t any whitespace character sequence
    l. T time in %H:%M:%S notation
    m. U week number of year - 00 to 53 (Sunday as first day of week)
    (with or without leading zeros)
    n. w day of week - 0 to 6 (Sunday = 0) (with or without leading
    zeros)
    o. W week number of year - 00 to 53 (Monday as first day of week)

    (with or without leading zeros)
    p. y last two digits of year - 00 to 99 (with or without leading
    zeros)
    q. Y four digit year including century
    then a call to strptime() reads characters from string and, in the
    case that these characters match the format of the directive,
    translates these characters into the appropriate member of the tm
    structure. Occurrences of "%%" in the format string are matched
    against a single "%" and do not affect the tm structure.
    Otherwise:
    A call to strptime() returns NULL and sets errno to ENOSYS.

    Test Strategy:
    PARENT process will
    CREATE child process using cppair()
    CHILD process will
    FOR each item in the assertion, and for fields with and without
    leading zeroes where allowed, and for locales VSX4L1 and VSX4L2
    where indicated:
    INITIALISE the tm structure to be set by strptime()
    INITIALISE the tm structure that strptime() will be checked
    against.

    IF testing the %p format:
    SET the locale for LC_TIME to VSX4L1 or VSX4L2
    OBTAIN the relevant pseudo-language data using pslanginfo()
    CONVERT the date and time string to a tm structure using
    strptime()
    VERIFY strptime() returns the expected tm structure.

    Test Information:
    time in %I:%M:%S %p format
    strptime("11:40:15 NM", "%r", &testbuf) failed.
    Current language is VSX4L1
    tm_sec = -1, expected 15
    tm_min = -1, expected 40
    tm_hour = -1, expected 23
    time in %I:%M:%S %p format
    strptime("11:49:45 am", "%r", &testbuf) failed.
    Current language is VSX4L2
    tm_sec = -1, expected 45
    tm_min = -1, expected 49
    tm_hour = -1, expected 11
    ************************************************************************


    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    Since PIN4.037 was granted to allow XSH4 compliant systems to use the
    t_fmt_ampm string instead of "%I:%M:%H %p", presumably the intention
    was to change the description of the strptime() %r conversion in XSH5.
    However, no such change was made in XSH5. Although it seems likely
    that the omission of this change was an oversight, the possibility
    that it was intentional needs to be ruled out before an equivalent
    permanent interpretation can be granted against XSH5.

    It is recommended that this request is forwarded to the working group
    to confirm that a permanent interpretation should be granted.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This request should go for a 14 day review.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion

    The Base Working group agrees with the Consultants response
    and recommends a PIN.

    XSH5's description of %r for strptime() is in direct conflict with
    POSIX.2 (P65, L2264-2269) and XBD5 (p74) where they say:

    t_fmt_ampm Define the appropriate time representation in the 12-hour
    clock format with am_pm, corresponding to the %r field descriptor. The
    operand consists of a string and can contain any combination of characters
    and field descriptors. It the string is empty, the
    12-hour format is not supported in the locale.

    This following change will be addressed in future corrigenda.
    The strptime() description of %r on XSH5, P889 should be changed from:

    %r is the time as %I:%M:%S %p.

    to

    %r 12-hour clock time using the AM/PM notation if t_fmt_ampm is not an
    empty string in the LC_TIME portion of the current locale; in the
    POSIX locale, this will be equivalent to "%I:%M:%S %p".

    and we believe the test suite should use a locale in which t_fmt_ampm is
    defined before using %r with strptime() or the date utility.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Permanent Interpretation (PIN)
    Review Conclusion
    A Permanent Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority