Retrieving Time-Zone Information

Last reviewed: September 25, 1995
Article ID: Q115231
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1, 3.5, and 3.51
        - Microsoft Windows 95 version 4.0
    

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, version 3.5 and later and Windows 95, 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().


Additional reference words: 3.50 4.00
KBCategory: kbprg
KBSubcategory: BseMisc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 25, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.