W9x/ME
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zones
NT/2000/XP
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
These won't help you much with determining the possible values in StandardName. Each time zone key has a value, Std, which doesn't correspond to the current setting in StandardName. For example I'm in GMT. StandardName is "GMT Standard Time" but under the Greenwich Standard Time key in time zones the value Std is "Greenwich Standard Time"
You can use the GetTimeZoneInformation() api to get the appropriate local time zone adjustments to your UTC time. You could also use the localtime() function in the C runtime to provide this functionality for you.
If you want to do it for another timezone then, as paulbent says, you need to read the registry to build the correct TIME_ZONE_INFORMATION type, and this would replace the GetTimeZoneInformation step in the above pseudo-code.
Note that on W9x/Me the SystemTimeToTzSpecificLocalTime API call is not supported, so you would have to write your own...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.