Re: 2000-01-01+13:00 and 1999-12-31-11:00 are equal?

Original Message From: "Costello, Roger L."
> In the XSD 1.1 data types specification it says this in the discussion of 
> the "date" data type:
>
>    Some date values with different time zone offsets
>    that were identical in the 1.0 version of this
>    specification, such as 2000-01-01+13:00 and
>    1999-12-31−11:00, are in this version of this
>    specification equal ...
>
> That seems to be a mistake.
>
> How can adding 13 hours onto January 1, 2000 equal December 31, 1999 minus 
> 11 hours?

I think it's easier to understand this by looking at times rather than 
dates.  Paris is 1 hour ahead of UTC/GMT.  Los Angeles is 8 hours behind (I 
think).

So when it's midday UTC, it is 13:00 in Paris and 04:00 in Los Angeles.

We write these in ISO format (roughly) as 13:00+1 (+1 for 1 hour ahead of 
UTC) and 04:00-8.

So to work the Paris time back to UTC time you have to _subtract_ from the 
time in Paris the amount by which it's ahead, thus doing the sum 13:00 - 1. 
In effect you have to change the sign before you do the sum in order to 
convert the offset time to UTC.

Hence the text.

HTH!

Pete Cordell
Codalogic Ltd
Twitter: http://twitter.com/petecordell
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info

Received on Monday, 17 September 2012 21:26:37 UTC