Fixes #5531: correctly detect timezone on windows