Fixes #5341: correctly detect timezone on windows