<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2129</bug_id>
          
          <creation_ts>2005-09-09 16:23:33 +0000</creation_ts>
          <short_desc>R-140: dateTime order relation and leap seconds</short_desc>
          <delta_ts>2007-03-29 18:48:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Datatypes: XSD Part 2</component>
          <version>1.0 only</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsAgreement</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6067</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-09 16:23:33 +0000</bug_when>
    <thetext>Consider the dateTime of the last leap second:

1998-12-31T23:59:60Z (P)

This instant in time can also have the lexical representation of, for example,

1998-12-31T22:59:60-01:00 (Q)

Section 3.2.7.3 defines the algoritm for comparing two dateTimes as follows:

&quot;A.Normalize P and Q. That is, if there is a timezone present, but it is not Z, 
convert it to Z using the addition operation defined in Adding durations to 
dateTimes (E)&quot;

Now in our example P has a Z timezone, but Q doesn&apos;t, so we need to normalize Q 
to Z using Appendix E. But E.1 says:

&quot;Leap seconds are handled by the computation by treating them as overflows. 
Essentially, a value of 60 seconds in S is treated as if it were a duration of 
60 seconds added to S (with a zero seconds field). All calculations thereafter 
use 60 seconds per minute.&quot;

This implies that Q is first mapped into:

1998-12-31T23:00:00-01:00

Then following the rest of algorithm in Appendix E, this will map into: 

1999-01-01T00:00:00Z 

Now comparing: 

1998-12-31T23:59:60Z 

and 

1999-01-01T00:00:00Z 

we find that 

P &lt; Q 

But P and Q represent the same value. So we have a contradiction: two lexical 
representations represent the same value, but the value represented by one 
lexical representation is less than the value represented by the other lexical 
representation.

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0043.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6068</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-09 16:23:47 +0000</bug_when>
    <thetext>See
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003AprJun/0020.html

Discussed at the May 2003 f2f. Decided to classify as error w/erratum and come 
back later for detailed consideration.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>