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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 0477 Actions


    Problem Report Number 0477
    Submitter's Classification Specification problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0096
    Raised 1994-10-17 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.4
    Test Identification ANSI.os/time/mktime 18
    Problem Summary PG4R.097 Under some circumstances, the tzname array is not filled in with the names of the timezones because it is not necessary for the time function to call tzset(). In mktime 18, the tm structure being pass...
    Problem Text
    Under some circumstances, the tzname array is not filled in with the
    names of the timezones because it is not necessary for the time
    function to call tzset(). In mktime 18, the tm structure being passed
    to the function being tested is invalid so mktime() will fail.
    mktime() is passed a tm structure with a tm_year component of MAX_INT
    (which is defined as 2147483647 in our implementation). On our
    implementation, before mktime() calls tzset(), it performs a cursory
    check on the tm structure to see if it is valid or not. One of the
    checks performed is to make sure the tm_year component is less than
    138 (since our time_t values will not exceed MAX_INT which represents
    Jan 15, 2038). By performing this test, we can avoid making a call to
    tzset() and prevent the executions of possibly thousands of
    instructions to parse out the TZ value.

    We claim the X/Open specification is ambiguous and does not require
    mktime() to act as though tzset() was called if the tm structure
    passed to mktime() is invalid.
    Test Output
    /tset/ANSI.os/time/mktime/T.mktime 18.Failed

    Test Description:
    mktime() sets the external variable tzname to contain the name of the
    standard time zone and the daylight savings time zone from the TZ
    variable in the first two elements of the tzname array respectively.
    Posix Ref: Component MKTIME Assertion 8.1-04(A)

    PARENT process will
    CREATE child process using cppair()
    CHILD process will
    INITIALISE expected tm structure with maximum values
    SET TZ to ABC-4:30:20 in env. using set_tz()
    CONVERT time to time since Epoch using mktime()
    VERIFY that tzname[0] = ABC
    SET TZ to JKL3:10:PNM4:40 in env. using set_tz()
    CONVERT time to time since Epoch using mktime()
    VERIFY that tzname[0] = JKL
    VERIFY that tzname[1] = PNM
    FOR all allowed characters <c> in time zone names
    SET TZ environment variable to <c><c><c>0, or A<c><c>0 if <c> is
    ':'
    CALL mktime()
    VERIFY that tzname[0] is <c><c><c>, or A<c><c> if <c> is ':'
    FOR all allowed characters <c> in time zone names
    SET TZ to XYZ-1:00:00<c><c><c>, or XYZ-1:00:00A<c><c> if <c> is
    ':'
    CALL mktime()
    VERIFY that tzname[1] is <c><c><c>, or A<c><c> if <c> is ':'
    IF testing in XPG3 mode
    SET tzname_max to _POSIX_NAME_MAX
    ELSE
    SET tzname_max to the lesser of {TZNAME_MAX} obtained from
    sysconf() and PCTS_TZNAME_MAX
    SET TZ environment variable to value with time zone names of length
    tzname_max
    CALL mktime()
    VERIFY that tzname[0] and tzname[1] have the correct values

    Test Information:
    with TZ=ABC-4:30:20 mktime() gave incorrect standard timezone name
    observed "EST", expected "ABC"
    with TZ=JKL3:10PNM4:40 mktime() gave incorrect standard timezone name
    observed "EST", expected "JKL"
    with TZ=JKL3:10PNM4:40 mktime() gave incorrect daylight saving timezone
    name
    observed "EDT", expected "PNM"

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    POSIX and XPG4 require tzname[] to be set on every call to
    mktime(), including failed calls. See POSIX.1-1990 section 8.1.1,
    penultimate paragraph:

    "Whenever ctime(), strftime(), mktime(), or localtime() is called,
    the time zone names contained in the external variable tzname shall
    be set as if the tzset() function had been called."

    It is recommended that this waiver request is refused.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority