Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5949/win32/src
Modified Files:
win32apimodule.cpp
Log Message:
Add SetLocalTime
Index: win32apimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** win32apimodule.cpp 27 Feb 2007 02:58:47 -0000 1.73
--- win32apimodule.cpp 6 Mar 2007 19:42:34 -0000 1.74
***************
*** 4510,4513 ****
--- 4510,4528 ----
}
+ // @pymethod |win32api|SetLocalTime|Changes the system's local time
+ static PyObject *PySetLocalTime (PyObject * self, PyObject * args)
+ {
+ SYSTEMTIME st;
+ PyObject *obst;
+ if (!PyArg_ParseTuple (args, "O:SetLocalTime",
+ &obst)) // @pyparm <o PyTime>|SystemTime||The local time to be set. Can also be a time tuple.
+ return NULL;
+ if (!PyWinObject_AsSYSTEMTIME(obst, &st))
+ return NULL;
+ if (!SetLocalTime(&st))
+ return PyWin_SetAPIError("SetLocalTime");
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
// @pymethod int|win32api|SetSystemTime|Returns the current system time
***************
*** 5641,5644 ****
--- 5656,5660 ----
{"SetLastError", PySetLastError, 1}, // @pymeth SetLastError|Sets the last error code known for the current thread.
{"SetSysColors", PySetSysColors, 1}, // @pymeth SetSysColors|Changes color of various window elements
+ {"SetLocalTime", PySetLocalTime, 1}, // @pymeth SetLocalTime|Changes the system's local time.
{"SetSystemTime", PySetSystemTime, 1}, // @pymeth SetSystemTime|Sets the system time.
{"SetClassLong", PySetClassLong,1}, // @pymeth SetClassLong|Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.
|