W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2008

[Bug 5939] New: Unintuitive results from op:time-equal

From: <bugzilla@wiggum.w3.org>
Date: Thu, 07 Aug 2008 10:39:18 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-5939-523@http.www.w3.org/Bugs/Public/>


           Summary: Unintuitive results from op:time-equal
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

The way that op:time-equal is currently defined leads to some unintuitive

For example I would have expected that adjusting the timezone of a time would
not affect the comparison, since it still represents the same point in time.

However consider the following query:

let $time := xs:time("23:00:00Z")
return adjust-time-to-timezone($time, xs:dayTimeDuration("PT2H"))
     = adjust-time-to-timezone($time, xs:dayTimeDuration("-PT2H"))

The two arguments yield the times 01:00:00+02:00 and 21:00:00-02:00.
Although these times refer to the same point in time, after they are converted
to xs:dateTimes their values differ by 24 hours, and so the result is false.

This seems very counter-intuitive.  Perhaps the normalization to the context
timezone should occur before conversion to xs:dateTime; or at least this case
should be mentioned in the specification.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 7 August 2008 10:39:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:24 UTC