RE: Time Zones and XML Schema date types

No, you cannot in general assume that
1999-01-16 = 1999-01-16T00:00:00Z

You may chose to interpret dates without timezones as belonging to 
a particular timezone, often the local or default timezone, in your
application but that's specific to your usage.


All the best, Ashok 
===========================================================
Ashok Malhotra              <mailto: ashokma@microsoft.com> 
Microsoft Corporation
212 Hessian Hills Road
Croton-On-Hudson, NY 10520 USA 
Redmond: 425-703-9462                New York: 914-271-6477 



-----Original Message-----
From: Jeff Rafter [mailto:jeffrafter@definedweb.com] 
Sent: Tuesday, May 08, 2001 8:14 PM
To: Ashok Malhotra
Cc: xmlschema-dev@w3.org
Subject: Re: Time Zones and XML Schema date types

>Consider a date like May 8, 2001.  This is actually a period of 24
hours
>(roughly).  The exact time the period starts and ends depends on the
>time zone.  So, I think, its clear why such types need a timezone.

Understanding both types as periods of time certainly does help, thanks.

>What is more controversial is why we allow dates without a timezone.
>This is to conform with SQL and also common usage.  Yes, it makes
>comparing dates with and without time zones complicated.

Is this a case where the common usage should outweigh other concerns,
especially when common usage includes an international standard?  It
seems
as though XML Schema could have avoided adding to the ISO spec in this
gray
area by simply allowing implementations to assume GMT-- though I am even
a
little fuzzy with how I think this would work.  Essentially, isn't it
safe
to presume (although the XML Schema spec prohibits it):

1999-01-16 = 1999-01-16T00:00:00Z

Assuming that 1999-01-16 is the 16th of January 1999-- shouldn't it
follow
that the starting instant of the date *is* 00:00:00Z?  I suppose not, I
am
faltering back and forth between a day is 24 hours (roguhly) beginning
in
timezone X and a day begins when the international date line is crossed.
I
am sure all of this has been thought through already (probably for many
years now).

Thanks again,
Jeff Rafter
Defined Systems
http://www.defined.net
XML Development and Developer Web Hosting

Received on Wednesday, 9 May 2001 11:11:28 UTC