How to preserve time zone preference in Windows XP and Vista

Between Windows XP and Vista (and server 2003 and 2008) Microsoft removed the key Index

from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones

and guessed what value we store in our database for the employee timezone record ...

(see http://support.microsoft.com/kb/935369 ).

What is the best value to use? Microsoft seems to favor using a registry key name for a given timezone (for example HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time

), but to me it sounds like magic constants.

Is there a value guaranteed to be unique and fixed across Windows versions, cultures, translations, and localizations?

+1


a source to share


1 answer


Unfortunately, it seems that these magic constants are the best way to identify these time zones.

In fact, this is exactly what the .NET 3.5 TimeZoneInfo class uses as an identifier field.



The .NET docs say it is "a key string that uniquely identifies a specific time zone." implying that it is not localized.

+1


a source







All Articles