I use following function to convert datetimes from UTC to my local time (West Australian Standard, +8 GMT).
var waTimeZone = TimeZoneInfo.FindSystemTimeZoneById("W. Australia Standard Time");
var timeInWA = TimeZoneInfo.ConvertTime(utcDateTime, TimeZoneInfo.Utc, waTimeZone);
However this code started behaving incorrectly for certain datetimes in our production server.
E.g
If I convert 31/10/2011 00:00 –> 31/10/2011 09:00 instead of 31/10/2011 08:00.
if I convert 01/10/2011 00:00 –> 01/10/2011 08:00 which is correct.
This code has been running fine for some time after production and we notice this few days ago. The server is set to GMT +8, although I don’t think that impacts this piece of code.
Also the same piece of code is running fine in other servers and local machines.
Could someone please provide some idea as to which might have caused this change of behavior? Windows Updates? IIS Configuration Change? .Net bug? etc…
UPDATE :
I checked for more information as Yahia suggested. Results are instesting.
waTimeZone.IsDaylightSavingTime(date) --> False
waTimeZone.GetUtcOffset(date) --> 08:00:00
But I still get the incorrect conversion of +9 hours instead of +8. So .Net is somewhat inconsistent here.
However I checked the registry entries of the server giving incorrect conversion and the local machine which provides me correct answers and it’s interesting.

I think our IT guys have not updated DST patches to the server.
Update : Confirmation that the IT guys have missed this server in their DST patch installations. That’s the root cause for this behaviour.
I suspect that the dates/times you listed differ regarding Daylight Saving – to make sure that this is really the case check the following for both values and
waTimeZone:As far as I can tell some parts of Australia don’t have DST anymore (ended DST in 2009 – see this WA government link http://wa.gov.au/daylightsaving/). what you see is not a bug but some action you missed to apply to the Server:
For MS Windows you will need to take some action to accomodate this change – see http://technet.microsoft.com/en-au/bb821275.aspx