INFO: Retrieving Time-Zone Information

ID: Q115231


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT, versions 3.5, 3.51, 4.0
    • Microsoft Windows versions 95, 98

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

Additional query words: 3.50 4.00 win 2000

Keywords :
Version : winnt:3.5,3.51,4.0
Platform : winnt
Issue type : kbinfo


Last Reviewed: February 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.