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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0321 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 0321.


Report 0321 Actions


    Problem Report Number 0321
    Submitter's Classification Specification problem
    State Resolved
    Resolution Permanent Interpretation (PIN)
    Problem Resolution ID PIN.X.0037
    Raised 1994-09-05 08:00
    Updated 2003-03-13 08:00
    Published 1994-06-14 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.32
    Test Identification XPG4.os/time/strptime 3
    Specification System Interfaces and Headers Issue 4
    Location in Spec See Problem Text
    Problem Summary PIN4.037 strftime(buf,maxsize,%r,tm) and strptime(buf,%r,tm) should be functional opposites of one another. In a given locale, it should be possible using these two functions to always get back to the starting...
    Problem Text
    strftime(buf,maxsize,%r,tm) and strptime(buf,%r,tm) should be functional
    opposites of one another. In a given locale, it should be possible
    using these two functions to always get back to the starting data
    ( for strftime() the struct tm data and for strptime() the character
    string buf) by using the other function. E.g. for something like
    strptime("11:49:45 pm","%r",&tm), it should be possible to pass the
    struct tm through strftime() and get back the "11:49:45 pm" character
    string.

    The XPG4 XSI specification for the %r conversion specifier for
    strftime() states: "%r is replaced by the time in a.m. and p.m.
    notation; in the POSIX locale this is equivalent to %I:%M:%S %p."

    The XPG XSI specification for the %r conversion specifier for
    strptime() states: "%r is the time as %I:%M:%H %p."

    Thus strftime() uses the locale information as defined in the
    localedef keyword t_fmt_ampm. strptime() as defined uses only the
    POSIX locale defined t_fmt_ampm string and not that of the locale
    in use. strptime() needs to use the t_fmt_ampm defined in the current locale
    in order to be able to convert back to what strftime() started with.
    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 :

    i. r time in %I:%M:%S %p format

    Test Information:

    time in %I:%M:%S %p format
    strptime("11'40'15 NM", "%r", &testbuf) failed.
    Current language is VSX4L1
    return value was NULL
    time in %I:%M:%S %p format
    strptime("11'49'45 am", "%r", &testbuf) failed.
    Current language is VSX4L2
    return value was NULL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    The difference between the %r formatting directive for strftime() and strptime()
    for locales other than the POSIX locales may have been an oversight in the
    XPG4 specification or may have been a deliberate decision of the specification
    authors.

    This should be forwarded to the K/RT working group to check that the statements
    in the specification are as intended. If this is the case then it is
    recommended that the interpretation request is refused.

    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