Index: /trunk/include/iprt/time.h
===================================================================
--- /trunk/include/iprt/time.h	(revision 26208)
+++ /trunk/include/iprt/time.h	(revision 26209)
@@ -602,7 +602,18 @@
  *
  * @returns pTime.
- * @param   pTime   Where to store the time.
+ * @param   pTime       Where to store the time.
  */
 RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPEC pTime);
+
+/**
+ * Sets the system time.
+ *
+ * @returns IPRT status code
+ * @param   pTime       The new system time (UTC).
+ *
+ * @remarks This will usually fail because changing the wall time is usually
+ *          requires extra privileges.
+ */
+RTDECL(int) RTTimeSet(PCRTTIMESPEC pTime);
 
 /**
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 26208)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 26209)
@@ -487,4 +487,5 @@
 	r3/posix/rand-posix.cpp \
 	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/semrw-posix.cpp \
 	r3/posix/thread-posix.cpp \
@@ -558,4 +559,5 @@
 	r3/posix/process-posix.cpp \
 	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/timelocal-posix.cpp \
 	r3/posix/utf8-posix.cpp
@@ -589,4 +591,5 @@
 	r3/posix/RTFileQueryFsSizes-posix.cpp \
 	r3/posix/RTSystemQueryOSInfo-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/dir-posix.cpp \
 	r3/posix/env-posix.cpp \
@@ -645,4 +648,5 @@
 	r3/posix/RTMpGetCount-posix.cpp \
 	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/semevent-posix.cpp \
 	r3/posix/semeventmulti-posix.cpp \
@@ -682,4 +686,5 @@
 	r3/posix/rand-posix.cpp \
 	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/semevent-posix.cpp \
 	r3/posix/semeventmulti-posix.cpp \
@@ -749,4 +754,5 @@
 	r3/posix/rand-posix.cpp \
 	r3/posix/RTTimeNow-posix.cpp \
+	r3/posix/RTTimeSet-posix.cpp \
 	r3/posix/time-posix.cpp \
 	r3/posix/timelocal-posix.cpp
Index: /trunk/src/VBox/Runtime/r3/darwin/time-darwin.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/darwin/time-darwin.cpp	(revision 26208)
+++ /trunk/src/VBox/Runtime/r3/darwin/time-darwin.cpp	(revision 26209)
@@ -98,12 +98,4 @@
 
 
-/**
- * Gets the current nanosecond timestamp.
- *
- * This differs from RTTimeNanoTS in that it will use system APIs and not do any
- * resolution or performance optimizations.
- *
- * @returns nanosecond timestamp.
- */
 RTDECL(uint64_t) RTTimeSystemNanoTS(void)
 {
@@ -112,12 +104,4 @@
 
 
-/**
- * Gets the current millisecond timestamp.
- *
- * This differs from RTTimeNanoTS in that it will use system APIs and not do any
- * resolution or performance optimizations.
- *
- * @returns millisecond timestamp.
- */
 RTDECL(uint64_t) RTTimeSystemMilliTS(void)
 {
@@ -126,10 +110,4 @@
 
 
-/**
- * Gets the current system time.
- *
- * @returns pTime.
- * @param   pTime   Where to store the time.
- */
 RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPEC pTime)
 {
Index: /trunk/src/VBox/Runtime/r3/win/time-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/time-win.cpp	(revision 26208)
+++ /trunk/src/VBox/Runtime/r3/win/time-win.cpp	(revision 26209)
@@ -136,12 +136,4 @@
 
 
-/**
- * Gets the current nanosecond timestamp.
- *
- * This differs from RTTimeNanoTS in that it will use system APIs and not do any
- * resolution or performance optimizations.
- *
- * @returns nanosecond timestamp.
- */
 RTDECL(uint64_t) RTTimeSystemNanoTS(void)
 {
@@ -150,12 +142,4 @@
 
 
-/**
- * Gets the current millisecond timestamp.
- *
- * This differs from RTTimeNanoTS in that it will use system APIs and not do any
- * resolution or performance optimizations.
- *
- * @returns millisecond timestamp.
- */
 RTDECL(uint64_t) RTTimeSystemMilliTS(void)
 {
@@ -164,10 +148,4 @@
 
 
-/**
- * Gets the current system time.
- *
- * @returns pTime.
- * @param   pTime   Where to store the time.
- */
 RTDECL(PRTTIMESPEC) RTTimeNow(PRTTIMESPEC pTime)
 {
@@ -179,10 +157,17 @@
 
 
-/**
- * Gets the current local system time.
- *
- * @returns pTime.
- * @param   pTime   Where to store the local time.
- */
+RTDECL(int) RTTimeSet(PCRTTIMESPEC pTime)
+{
+    FILETIME    FileTime;
+    SYSTEMTIME  SysTime;
+    if (FileTimeToSystemTime(RTTimeSpecGetNtFileTime(pTime, &FileTime), &SysTime))
+    {
+        if (SetSystemTime(&SysTime))
+            return VINF_SUCCESS;
+    }
+    return RTErrConvertFromWin32(GetLastError());
+}
+
+
 RTDECL(PRTTIMESPEC) RTTimeLocalNow(PRTTIMESPEC pTime)
 {
@@ -197,14 +182,4 @@
 
 
-/**
- * Gets the delta between UTC and local time.
- *
- * @code
- *      RTTIMESPEC LocalTime;
- *      RTTimeSpecAddNano(RTTimeNow(&LocalTime), RTTimeLocalDeltaNano());
- * @endcode
- *
- * @returns Returns the nanosecond delta between UTC and local time.
- */
 RTDECL(int64_t) RTTimeLocalDeltaNano(void)
 {
@@ -221,11 +196,4 @@
 
 
-/**
- * Explodes a time spec to the localized timezone.
- *
- * @returns pTime.
- * @param   pTime       Where to store the exploded time.
- * @param   pTimeSpec   The time spec to exploded. (UTC)
- */
 RTDECL(PRTTIME) RTTimeLocalExplode(PRTTIME pTime, PCRTTIMESPEC pTimeSpec)
 {
