SetDateTime method of the Win32_OperatingSystem Class
Applies to: desktop apps only
The SetDateTime WMI class method sets the current system time on the computer. The calling process must have the SE_SYSTEMTIME_NAME privilege.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 SetDateTime( datetime LocalDatetime );
Parameters
- LocalDatetime
-
Value of the current time.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012