INFO: Retrieving Time-Zone Information (115231)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • Microsoft Windows NT Server 3.5
    • Microsoft Windows NT Server 3.51
    • Microsoft Windows NT Server 4.0
    • Microsoft Windows NT Workstation 3.5
    • Microsoft Windows NT Workstation 3.51
    • Microsoft Windows NT Workstation 4.0
    • Microsoft Windows 98
    • Microsoft Windows 95

This article was previously published under Q115231
In Windows NT, version 3.1, the time-zone strings are compiled into a resource that is linked into the Control.exe file. For Windows NT, versions 3.5 and later and Windows 95, Windows 98, and Windows 2000, the time-zone strings have been moved into the registry.

In Windows NT, the time-zone strings are located in the key:
   HKEY_LOCAL_MACHINE\SOFTWARE\ 
      Microsoft\ 
      Windows NT\ 
      CurrentVersion\ 
      Time Zones.
		
In Windows 95, the time-zone strings are located in the key:
   HKEY_LOCAL_MACHINE\SOFTWARE\ 
      Microsoft\ 
      Windows\ 
      CurrentVersion\ 
      Time Zones.
		
For each time zone, the registry key TZI is formatted as follows:

   LONG       Bias;
   LONG       StandardBias;
   LONG       DaylightBias;
   SYSTEMTIME StandardDate;
   SYSTEMTIME DaylightDate;
		
You can use this information to fill out a TIME_ZONE_INFORMATION structure, which is used when calling SetTimeZoneInformation().

SUMMARY


Modification Type:MinorLast Reviewed:3/7/2005
Keywords:kbinfo KB115231