I retired from personal blogging in July 2008 but you can find me over at blog.xero.com
Follow @roddrury
We’re building an application that requires displaying times in various countries. The problem is displaying the time correctly with Daylight saving etc. We looked at WebServices but then found this example which shows that all times, including daylight savings info, are in the Registry.
World Clock and the TimeZoneInformation class
Windows NT’s time zone database is stored in the registry, at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. Under this key are subkeys describing each time zone. Each subkey has the following values (examples taken from the GMT Standard Time key):
| Value | Type | Purpose | Example |
| Display | REG_SZ |
Display name | (GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London |
| Dlt | REG_SZ |
Name for zone during Daylight Savings | GMT Daylight Time |
| Index | REG_DWORD |
Unique index number for zone | 85 |
| MapID | REG_SZ |
Unknown. May be related to Win95 clickable time zone map. | 0,1 |
| Std | REG_SZ |
Name for zone outside Daylight Savings | GMT Standard Time |
| TZI | REG_BINARY |
Offsets and savings start/end date |
