Defiantly 9.0 here.. although what's strange is that it lists the base
timezone difference as 8.0 but seems to think Australia is in daylight
savings time at the moment.

I also see this on my Win2003 dedicated server?

Any thoughts?


On Wed, Dec 16, 2009 at 6:53 PM, Cerebrus <[email protected]> wrote:

> 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