Lists Home |
Date Index |
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.
We have a Scheduled item that is to be done on July 16th, 2002 at 2PM
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
this could be written as :
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
where at the end, GXXXX specifies the locale identifier of the originally
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!!
Author "XML Application Development with MSXML 4.0"