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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 2607 Actions


    Problem Report Number 2607
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.1354
    Raised 2015-04-18 00:47
    Updated 2015-05-08 10:07
    Published 2015-05-08 10:07
    Product Standard Internationalised System Calls and Libraries Extended V4 (UNIX V7)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.7.9NW
    Test Identification /tset/ANSI.os/time/strftime_X/T.strftime_X{9}
    Specification Base Specifications Issue 7
    Problem Summary VSX expecting to *not* get 1-3 digits year zero-padded in "%F" result in strftime().
    Problem Text It seems to me that XPG7 spec document and VSX are not align.
    I'll prepare changeset to pass VSX, but in parallel, want to
    clarify it I'm misreading spec doc or is there any possible
    correction/improvement in spec doc and/or in VSX.

    VSX looks intentionally expecting to *not* get 1-3 digits
    year zero-padded in "%F" result.

    According to the spec, when no flag and no minimum width are specified,
    "%F" is equivalent to "%+4Y-%m-%d". And the flag "+" specifies to use
    '0' as padding character.

    ---- quote about XPG7's support for years outside of 1000-9999 ----

    In the past, the C and POSIX standards specified that %F produced an ISO
    8601:2000 standard date format, but didn't specify which one. For years in
    the range [0001,9999], POSIX.1-2008 requires that the output produced match
    the ISO 8601:2000 standard complete representation extended format
    (YYYY-MM-DD) and for years outside of this range produce output that matches
    the ISO 8601:2000 standard expanded representation extended format
    (<+/-><Underline>Y</Underline>YYYY-MM-DD). To fully meet ISO 8601:2000
    standard requirements, the producer and consumer must agree on a date format
    that has a specific number of bytes reserved to hold the characters used to
    represent the years that is sufficiently large to hold all values that will
    be shared. For example, the %+13F conversion specification will produce
    output matching the format "<+/->YYYYYY-MM-DD" (a leading '+' or '-' sign; a
    six-digit, 0-filled year; a '-'; a two-digit, leading 0-filled month; another
    '-'; and the two-digit, lead
    ing 0-filled day within the month).

    Note that if the year being printed is greater than 9999, the resulting
    string from the unadorned %F conversion specifications will not conform to
    the ISO 8601:2000 standard extended format, complete representation for a
    date and will instead be an extended format, expanded representation
    (presumably without the required agreement between the date's producer and
    consumer).

    ---- quote from RATIONALE section of XPG7 ----

    The %Y conversion specification to strftime() was frequently assumed to be a
    four-digit year, but the ISO C standard does not specify that %Y is
    restricted to any subset of allowed values from the tm_year field. Similarly,
    the %C conversion specification was assumed to be a two-digit field and the
    first part of the output from the %F conversion specification was assumed to
    be a four-digit field. With tm_year being a signed 32 or more-bit int and
    with many current implementations supporting 64-bit time_t types in one or
    more programming environments, these assumptions are clearly wrong.

    ---- end of quotes ----
    Test Output strftime(str, size, %F, &tmbuf) returned incorrectly formatted string
    Expected string: 10000-10-23
    Actual string: +10000-10-23
    strftime(str, size, %F, &tmbuf) returned incorrectly formatted string
    Expected string: 123-10-23
    Actual string: 0123-10-23
    strftime(str, size, %F, &tmbuf) returned incorrectly formatted string
    Expected string: 1-10-23
    Actual string: 0001-10-23

    Review Information

    Review Type TSMA Review
    Start Date 2015-04-18 00:47
    Last Updated 2015-04-20 12:19
    Completed 2015-04-20 12:19
    Status Complete
    Review Recommendation Test Suite Deficiency (TSD)
    Review Response This is accepted as a fault in the test suite.

    Review Type SA Review
    Start Date 2015-04-20 20:19
    Last Updated 2015-05-08 10:06
    Completed 2015-05-08 10:06
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion A test suite deficiency is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority