That code is getting the time zone information from your computer system's time zone settings. However, if you have not updated those settings with the latest Microsoft updates for your region, it won't be correct. You did not say what time zone you are in, but I am betting that there is a Microsoft update that you have not installed to correct this. There is (or was) also a tool that you can use to update the settings yourself if no update is available.