Time Zone Registry Settings (Windows Embedded CE 6.0)

1/6/2010

This topic describes time-related registry key settings at the device's operating system level. **

Setting System Time Zone Information

System time information is specified by various registry key settings under HKEY_LOCAL_MACHINE\Time and HKEY_LOCAL_MACHINE\Time Zones, plus the TIME_ZONE_INFORMATION and TZREG structures, all of which are described below.

To set time zone information while the target device is running, use the following registry key:

[HKEY_LOCAL_MACHINE\Time]
   "TimeZoneInformation": (REG_BINARY): TIME_ZONE_INFORMATION (structure)

To set time zone information during a cold boot, use the following registry key:

[HKEY_LOCAL_MACHINE\Time Zones]
   "@": REG_SZ

The default data value of the Time Zones key is the standard time zone name used as the default time zone for the device during a cold boot. **The registry key uses the standard time zone name if the TIME_ZONE_INFORMATION structure is not available. The name of the time zone corresponds to one of the following additional time zone entries that are used to provide information for a specified time zone:

[HKEY_LOCAL_MACHINE\Time Zones\<Standard Time Zone Name>]
   "TZI": REG_BINARY
   "Dlt": REG_SZ
   "Std": REG_SZ

The standard time zone name corresponds to the StandardName member of the TIME_ZONE_INFORMATION structure, so the same rules and conditions that apply to the structure apply to this registry key.

You can create a separate entry in the registry for each time zone. For details, see the Common.reg file.

  • The TZI registry data value corresponds to the TZREG structure, which is defined as follows:

    typedef struct tagTZREG {
        LONG Bias;
        LONG StandardBias;
        LONG DaylightBias;
        SYSTEMTIME StandardDate;
        SYSTEMTIME DaylightDate;
    } TZREG;
    
  • The Dlt registry value is the name used for daylight saving time. Because this value corresponds to the DaylightName member of the TIME_ZONE_INFORMATION structure, the same rules and conditions that apply to the structure apply to this registry value. For more information on how to set the operating system to daylight saving time, see Daylight Saving Time Registry Settings.

  • The Std registry value corresponds to a translated string to display the standard time name of the time zone.

A call to the GetTimeZoneInformation function retrieves the TIME_ZONE_INFORMATION structure. The data in the TIME_ZONE_INFORMATION structure provides the information that the function returns. If the structure is not found, the @ data value of the Time Zones subkey, which is the default value, is retrieved. If this value is missing, the Pacific Time Zone is used.

A call to the SetTimeZoneInformation function sets the registry data value TimeZoneInformation to the TIME_ZONE_INFORMATION structure passed into the API. In addition, the NOTIFICATION_EVENT_TIME_CHANGE notification event is triggered.

When the OS starts, Filesys.exe makes a call to the GetTimeZoneInformation function to set time zone information for the OS.

See Also

Concepts

Daylight Saving Time Registry Settings

Other Resources

Core OS Registry Settings