W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

RE: Time Zones and XML Schema date types

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Wed, 9 May 2001 05:20:20 -0700
Message-ID: <9D884881F5E1F24FB845967851720FC3797D20@red-msg-12.redmond.corp.microsoft.com>
To: "Jeff Rafter" <jeffrafter@definedweb.com>
Cc: <xmlschema-dev@w3.org>
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
>(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
as though XML Schema could have avoided adding to the ISO spec in this
area by simply allowing implementations to assume GMT-- though I am even
little fuzzy with how I think this would work.  Essentially, isn't it
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
that the starting instant of the date *is* 00:00:00Z?  I suppose not, I
faltering back and forth between a day is 24 hours (roguhly) beginning
timezone X and a day begins when the international date line is crossed.
am sure all of this has been thought through already (probably for many
years now).

Thanks again,
Jeff Rafter
Defined Systems
XML Development and Developer Web Hosting
Received on Wednesday, 9 May 2001 11:11:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC