SetTimeZoneInformation (Windows CE 5.0)

Send Feedback

This function sets the current time-zone parameters. These parameters control translations from UTC to local time.

BOOLSetTimeZoneInformation(constTIME_ZONE_INFORMATION* lpTimeZoneInformation );

Parameters

  • lpTimeZoneInformation
    [in] Pointer to a TIME_ZONE_INFORMATION structure that contains the time-zone parameters to set.

Return Values

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

SetTimeZoneInformation does not change the clock and therefore will not affect subsequent calls to GetLocalTime. SetTimeZoneInformation only affects subsequent calls to GetSystemTime.

SetTimeZoneInformation does not save the newly written data into the persistent registry. To write the data permanently, you need to make the following call: RegFlushKey(HKEY_LOCAL_MACHINE). For more information, see RegFlushKey.

All translations between UTC and local time are based on the following formula.

UTC = local time + bias 

The bias is the difference, in minutes, between UTC and local time.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

See Also

Time Functions | GetLocalTime | GetSystemTime | GetTimeZoneInformation | RegFlushKey | TIME_ZONE_INFORMATION | Timer Driver Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.