Re: time order doesn't meet common sense

Ashok Malhotra wrote:

> You cannot subtract one time from another to get a duration.
> You must use dateTime.


Sure, that's not exactly what I meant...

Where I think that the order relation defined by W3C XML Schema is 
broken is that I can't express (for instance) the constraint that a time 
needs to be between 22:00:00 and 06:00:00 next day (except with complex 
contorsions on timezones).

Thanks,

Eric


> 
> All the best, Ashok 
> ===========================================================
> 
> 
> -----Original Message-----
> From: Eric van der Vlist [mailto:vdv@dyomedea.com] 
> Sent: Saturday, October 27, 2001 6:32 AM
> To: www-xml-schema-comments@w3.org
> Subject: xs:time order doesn't meet common sense
> 
> When defining a time format with hours between 0 and 24, ISO 8601 has 
> not defined any order relation on these values... and this is leading to 
> weird consequences!
> 
> Let's take the example of a plane with a daily summer time schedule 
> leaving San Francisco at 16:30:00-07:00 to arrive in Paris at 
> 10:45:00+02:00 the next day.
> 
> The definition of the order between those two times given by W3C XML 
> Schema would lead us to the conclusion that this plane arrives before 
> leaving.
> 
> This problem might be solved if values greater than 24 were accepted for 
> the hour (the plane would then arrive at 34:45:00+02:00, ie 25:45:00-07:00).
> 
> What is especially inconsitent is that the actual value space of xs:time 
> is already exceeding the 24 hours to cover the 52 hours from 00:00:00+14 
> to 24:00:00-14!
> 
> This means that by carefully selecting the timezones one might be able 
> to get planes which arrive after leaving.
> 
> To go back to our example, 16:30:00-07:00 is also 01:30:00+02:00 (the 
> next day) and the plane is flying from 01:30:00+02:00 to 10:45:00+02:00...
> 
> This cannot be extended to be the general case (the flight may have been 
> longer) and relaxing the constraint on the range of the hours part would 
> only generalize something which is already allowed...
> 
> I think that the issue is coming from the definition of the order 
> relation for xs:time:
> 
> "The order relation on time values is the Order relation on dateTime 
> (§3.2.7.3) using an arbitrary date. "
> 
> This doesn't really make sense since xs:time is a recurring point in 
> time, not a duration. The consequence is that by changing the timezone 
> of the arbitrary date, you can change the result of the comparison.
> 
> Eric (jetlagged after this exercise)
> 



-- 
Rendez-vous à Paris pour le Forum XML.
                    http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Sunday, 28 October 2001 03:33:23 UTC