SetDynamicTimeZoneInformation Function
SetDynamicTimeZoneInformation Function

Sets the current time zone and dynamic daylight saving time settings. These settings control translations from Coordinated Universal Time (UTC) to local time.

Syntax

BOOL WINAPI SetDynamicTimeZoneInformation(
  __in  const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation
);


Parameters

lpTimeZoneInformation [in]

A pointer to a DYNAMIC_TIME_ZONE_INFORMATION structure.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

An application must have the SE_TIME_ZONE_NAME privilege for this function to succeed. This privilege is disabled by default. Use the AdjustTokenPrivileges function to enable the privilege before calling SetDynamicTimeZoneInformation, and then to disable the privilege after the SetDynamicTimeZoneInformation call. For more information, see Running with Special Privileges.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

DYNAMIC_TIME_ZONE_INFORMATION
GetDynamicTimeZoneInformation
Time Functions

Send comments about this topic to Microsoft

Build date: 11/19/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View