XML Timezones

I am writing a Windows Scheduling Service in C# that will use data in XML
format to determine Scheduling information. This same file will be
replicated globally and hence will be subject to timezone changes and
daylight saving time.

[my timezone values are just examples - they may not be correct!!]

I was originally using the XSD dateTime data type to determine the date and
time to perform a task, but this is limited when applied globally, because
the offset (timezone) is based on local time and as soon as you replicate to
some other timezone, the local time changes and so your scheduling
information goes nuts.

An example...

We have a Scheduled item that is to be done on July 16th, 2002 at 2PM
Scottish time.
This is simple to express as July 16th, 2002 at 2PM GMT (summer has no
daylight saving time).
According to the XML Schema stanard
(http://www.w3.org/TR/xmlschema-2/#dateTime) which uses the format
"CCYY:MM:DDTHH:MMZ"
this could be written as :
"2002:07:16T14:00Z"

However, this standard format doesn't work too great because in the winter
the local time in Scotland changes to 1 hour less than UTC and so the
scheduled time should change to "2002:07:16T13:00Z" or 1PM GMT, but how do
you know this from the above fomat? Sure, it tells you the date, so you can
work out whether Daylight Saving Time applies, but you don't know what
timezone it refers to - it is a bad mistake to assume the local timezone,
because if i moved the Schedule information to Santiago, Chile and we
assumed the local settings to determine the offset then on that date the UTC
time would be "2002:07:16T08:00Z" - because here we are 8 hours behind GMT
on that date.

There needs to be some way of stating the target timezone so that the
correct Daylight settings relative to UTC can be resolved. Something like
this...

"CCYY:MM:DDTHH:MM:SSZGXXXX"

where at the end, GXXXX specifies the locale identifier of the originally
scheduled time.

Does that make any sense?? Has there been talk of this before... 

I never really thought much about it until i had to use it in my app!!

Cheers,
Steven
Author "XML Application Development with MSXML 4.0"
www.deltabis.com

Received on Sunday, 23 December 2001 11:32:44 UTC