G
Guest
I'm seeing TimeZone.CurrentTimeZone accurately reflecting the machine time
zone at the point that the assembly loads, but if the user subsequently
changes the Windows time zone the value of TimeZone.CurrentTimeZone doesn’t
change to reflect that.
In other words, if the system is on PST when my assembly loads then whenever
time I instantiate a TimeZone object
(System.TimeZone tz = System.TimeZone.CurrentTimeZone
the value of tz.StandardName returns "Pacific Standard Time" and
tz.GetUtcOffset comes back as -08:00:00 - even if I change to Brisbane time
(+10:00:00)
Is there some trick to this that I'm missing?
I've got an Outlook add-in that's passing date values to a web service. Even
though it works in UTC internally, the SOAP proxy classes expect values in
local time to which the parser then assigns an offset. The conversions to and
from UTC continue to use the original offset even if the user changes time
zones, which corrupts the data.
zone at the point that the assembly loads, but if the user subsequently
changes the Windows time zone the value of TimeZone.CurrentTimeZone doesn’t
change to reflect that.
In other words, if the system is on PST when my assembly loads then whenever
time I instantiate a TimeZone object
(System.TimeZone tz = System.TimeZone.CurrentTimeZone
the value of tz.StandardName returns "Pacific Standard Time" and
tz.GetUtcOffset comes back as -08:00:00 - even if I change to Brisbane time
(+10:00:00)
Is there some trick to this that I'm missing?
I've got an Outlook add-in that's passing date values to a web service. Even
though it works in UTC internally, the SOAP proxy classes expect values in
local time to which the parser then assigns an offset. The conversions to and
from UTC continue to use the original offset even if the user changes time
zones, which corrupts the data.