S
Stephen Ahn
Using dotnet 1.1 sp1,
Windows XP sp 2, with Windows auto update on.
Prerequisites to reproduce behaviour :
In control panel, set Windows timezone to :
GMT +10 Canberra, Melbourne, Sydney,
Tick : Automatically adjust clock for daylight saving changes,
set local date to correct local date (eg. 30 May 2006).
Then run following code :
==
DateTime dt = new DateTime(2005, 3, 31);
string xml = System.Xml.XmlConvert.ToString(dt);
MessageBox.Show(xml);
==
xml contains :
"2005-03-31T00:00:00.0000000+11:00"
This seems to be wrong (would expect : "2005-03-31T00:00:00.0000000+10:00"),
since 31 Mar 05 in Sydney was not in daylight savings time. The code seems
to be treating the date as though that date was daylight savings time.
If I run the code on another Windows XP (but which does not have latest
windows updates), the expected result with +10 shows up. Perhaps this
problem has something to do with the hotfix Microsoft recently provided for
Australia to adjust for the later end to daylight savings time in 2006 due
to the commonwealth games ?. i.e. in Sydney, a date of 31 Mar 2006 IS in
DST, but not 31 Mar 2005.
Has anyone else encountered this ?
TIA,
Stephen
Windows XP sp 2, with Windows auto update on.
Prerequisites to reproduce behaviour :
In control panel, set Windows timezone to :
GMT +10 Canberra, Melbourne, Sydney,
Tick : Automatically adjust clock for daylight saving changes,
set local date to correct local date (eg. 30 May 2006).
Then run following code :
==
DateTime dt = new DateTime(2005, 3, 31);
string xml = System.Xml.XmlConvert.ToString(dt);
MessageBox.Show(xml);
==
xml contains :
"2005-03-31T00:00:00.0000000+11:00"
This seems to be wrong (would expect : "2005-03-31T00:00:00.0000000+10:00"),
since 31 Mar 05 in Sydney was not in daylight savings time. The code seems
to be treating the date as though that date was daylight savings time.
If I run the code on another Windows XP (but which does not have latest
windows updates), the expected result with +10 shows up. Perhaps this
problem has something to do with the hotfix Microsoft recently provided for
Australia to adjust for the later end to daylight savings time in 2006 due
to the commonwealth games ?. i.e. in Sydney, a date of 31 Mar 2006 IS in
DST, but not 31 Mar 2005.
Has anyone else encountered this ?
TIA,
Stephen