GetUtcOffset gives the wrong value

Nov 5, 2008 at 10:03 AM
I'm testing GetUtcOffset either side of the daylight cut-over for Sydney, and I always get 11 hours:

            TzTimeZone tzZone = TzTimeZone.GetTimeZone("Australia/Sydney");
            double h1 = tzZone.GetUtcOffset(DateTime.Parse("1-Oct-2008 12:00")).TotalHours;
            double h2 = tzZone.GetUtcOffset(DateTime.Parse("31-Oct-2008 12:00")).TotalHours;

Testing "IsDaylightSavingTime" definitely gives me the results I expect:

            bool b1 = tzZone.IsDaylightSavingTime(DateTime.Parse("1-oct-2008 12:00")); // gives false
            bool b2 = tzZone.IsDaylightSavingTime(DateTime.Parse("31-oct-2008 12:00")); // gives true