This is just a quick post to give some detail about a problem I dealt with, because when searching for it I got no direct hits to my specific problem, at least not for “Singapore Standard Time”.
We prompt our Windows Autopilot users to confirm the Timezone, Regional format and Country after first login and that’s been working great so far, until a user in Singapore tried it, and the timezone was not set correctly even though it was correctly listed.
Get-TimeZone -listavailable | Export-CSV TimeZones.txt
Running that will indeed list the “Singapore Standard Time” timezone as shown here.
I debugged the script and found the following was happening. The script uses Powershell to set the timezone using the Set-TimeZone cmdlet, for example:
Set-TimeZone -name "Singapore Standard Time"
Running that in Powershell should set the time zone correctly, however it doesn’t !
Set-TimeZone : The time zone name 'Singapore Standard Time' was not found on the local computer.
Which was odd !
After looking through the registry I found this key.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time
So I was attempting to set the timezone based on what windows returned as the Id, instead I should be setting it based on the StandardName.
a closer look at get-timezone reveals that info is actually present..
and using the above does correctly set the Singapore time zone. Job done !