Returns "8.0" for me, as expected. Perhaps you modified your registry
settings inadvertently ?

Check the key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
Zones\W. Australia Standard Time

On Dec 16, 7:15 pm, mijk <[email protected]> wrote:
> Hi All,
>
> I'm having a bit of trouble with the GetUtcOffset method of
> TimeZoneInfo.
>
> The code below should return the corrent timezone offset in hours for
> western Australia.. which at the moment is 8 hours.  The code however
> returns 9 hours and I cannot understand why.
>
> Another interesting point is that IsDaylightSavingTime
> (DateTime.UtcNow) returns true when it is daylight savings time is not
> currently active in western Australia.
>
> Any thoughts?
>
> Thanks
>
> Mike
>
> TimeZoneInfo info = TimeZoneInfo.FindSystemTimeZoneById("W. Australia
> Standard Time");
>
> var hours = info.GetUtcOffset(DateTime.UtcNow).TotalHours;

Reply via email to