Index: /trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp	(revision 79525)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp	(revision 79526)
@@ -100,5 +100,5 @@
 
         Timestamp tsIssued = b->issued();
-        cb += tsIssued.absStrFormat(pfnOutput, pvArgOutput);
+        cb += tsIssued.strFormatHelper(pfnOutput, pvArgOutput);
 
         cb += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
@@ -108,5 +108,5 @@
         Timestamp tsValid = b->issued();
         tsValid.addSeconds(b->leaseTime());
-        cb += tsValid.absStrFormat(pfnOutput, pvArgOutput);
+        cb += tsValid.strFormatHelper(pfnOutput, pvArgOutput);
     }
 
Index: /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.cpp
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.cpp	(revision 79525)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.cpp	(revision 79526)
@@ -23,18 +23,13 @@
 #include "Timestamp.h"
 
-#include <iprt/string.h>
 
+size_t Timestamp::strFormatHelper(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput) const
+{
+    RTTIMESPEC TimeSpec;
+    RTTIME     Time;
+    char       szBuf[64];
+    ssize_t    cchBuf = RTTimeToStringEx(RTTimeExplode(&Time, getAbsTimeSpec(&TimeSpec)), szBuf, sizeof(szBuf), 0);
+    Assert(cchBuf > 0);
+    return pfnOutput(pvArgOutput, szBuf, cchBuf);
+}
 
-size_t Timestamp::absStrFormat(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput) const
-{
-    RTTIMESPEC Spec;
-    getAbsTimeSpec(&Spec);
-
-    RTTIME Time;
-    RTTimeExplode(&Time, &Spec);
-
-    return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
-                       "%RI32-%02u-%02uT%02u:%02u:%02uZ",
-                       Time.i32Year, Time.u8Month, Time.u8MonthDay,
-                       Time.u8Hour, Time.u8Minute, Time.u8Second);
-}
Index: /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.h
===================================================================
--- /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.h	(revision 79525)
+++ /trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.h	(revision 79526)
@@ -26,40 +26,44 @@
 
 /**
- * Timestamp API uses unsigned time, but we need to be able to refer
- * to events in the past.  Hide the ugly convertions.
+ * Wrapper around RTTIMESPEC.
  *
- * @todo r=bird: Unnecessary mixing of RTTimeNanoTS and RTTimeNow.
+ * @note Originally wanting to use RTTimeNanoTS rather than RTTimeNow.  The term
+ *       "absolute" was used for when the RTTimeNanoTS() value was converted to
+ *       something approximating unix epoch relative time with help of
+ *       RTTimeNow().  Code was later changed to just wrap RTTIMESPEC and drop
+ *       all usage of RTTimeNanoTS, ASSUMING that system time is stable.
  */
 class Timestamp
 {
-    int64_t m_ns;
+    RTTIMESPEC m_TimeSpec;
 
 public:
     Timestamp()
-      : m_ns(0)
-    {}
+    {
+        RTTimeSpecSetNano(&m_TimeSpec, 0);
+    }
 
-    Timestamp(uint64_t ns)
-      : m_ns(static_cast<int64_t>(ns))
-    {}
+    Timestamp(PCRTTIMESPEC a_pTimeSpec)
+    {
+        m_TimeSpec = *a_pTimeSpec;
+    }
 
+    /** Get a timestamp initialized to current time. */
     static Timestamp now()
     {
-        return Timestamp(RTTimeNanoTS());
+        RTTIMESPEC Tmp;
+        return Timestamp(RTTimeNow(&Tmp));
     }
 
-    static Timestamp absSeconds(int64_t sec)
+    /** Get a timestamp with the given value in seconds since unix epoch. */
+    static Timestamp absSeconds(int64_t secTimestamp)
     {
-        RTTIMESPEC delta;
-        RTTimeNow(&delta);
-        RTTimeSpecSubSeconds(&delta, sec);
-
-        uint64_t stampNow = RTTimeNanoTS();
-        return Timestamp(stampNow - RTTimeSpecGetNano(&delta));
+        RTTIMESPEC Tmp;
+        return Timestamp(RTTimeSpecSetSeconds(&Tmp, secTimestamp));
     }
 
     Timestamp &addSeconds(int64_t cSecs)
     {
-        m_ns += cSecs * RT_NS_1SEC;
+        RTTimeSpecAddSeconds(&m_TimeSpec, cSecs);
         return *this;
     }
@@ -67,16 +71,11 @@
     Timestamp &subSeconds(int64_t cSecs)
     {
-        m_ns -= cSecs * RT_NS_1SEC;
+        RTTimeSpecSubSeconds(&m_TimeSpec, cSecs);
         return *this;
     }
 
-
     RTTIMESPEC *getAbsTimeSpec(RTTIMESPEC *pTime) const
     {
-        RTTimeNow(pTime);
-
-        uint64_t stampNow = RTTimeNanoTS();
-        uint64_t delta = stampNow - m_ns;
-        RTTimeSpecSubNano(pTime, delta);
+        *pTime = m_TimeSpec;
         return pTime;
     }
@@ -84,21 +83,30 @@
     int64_t getAbsSeconds() const
     {
-        RTTIMESPEC time;
-        return RTTimeSpecGetSeconds(getAbsTimeSpec(&time));
+        return RTTimeSpecGetSeconds(&m_TimeSpec);
     }
 
-    size_t absStrFormat(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput) const;
+    /** Only for log formatting. */
+    size_t strFormatHelper(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput) const;
 
-    friend bool operator<(const Timestamp &l, const Timestamp &r);
-    friend bool operator>(const Timestamp &l, const Timestamp &r);
-    friend bool operator<=(const Timestamp &l, const Timestamp &r);
-    friend bool operator>=(const Timestamp &l, const Timestamp &r);
+    int compare(const Timestamp &a_rRight) const
+    {
+        return RTTimeSpecCompare(&m_TimeSpec, &a_rRight.m_TimeSpec);
+    }
+
+    friend bool operator<( const Timestamp &, const Timestamp &);
+    friend bool operator>( const Timestamp &, const Timestamp &);
+    friend bool operator==(const Timestamp &, const Timestamp &);
+    friend bool operator!=(const Timestamp &, const Timestamp &);
+    friend bool operator<=(const Timestamp &, const Timestamp &);
+    friend bool operator>=(const Timestamp &, const Timestamp &);
 };
 
 
-inline bool operator<(const Timestamp &l, const Timestamp &r) { return l.m_ns < r.m_ns; }
-inline bool operator>(const Timestamp &l, const Timestamp &r) { return l.m_ns > r.m_ns; }
-inline bool operator<=(const Timestamp &l, const Timestamp &r) { return l.m_ns <= r.m_ns; }
-inline bool operator>=(const Timestamp &l, const Timestamp &r) { return l.m_ns >= r.m_ns; }
+inline bool operator<( const Timestamp &l, const Timestamp &r) { return l.compare(r) < 0; }
+inline bool operator>( const Timestamp &l, const Timestamp &r) { return l.compare(r) > 0; }
+inline bool operator==(const Timestamp &l, const Timestamp &r) { return l.compare(r) == 0; }
+inline bool operator!=(const Timestamp &l, const Timestamp &r) { return l.compare(r) != 0; }
+inline bool operator<=(const Timestamp &l, const Timestamp &r) { return l.compare(r) <= 0; }
+inline bool operator>=(const Timestamp &l, const Timestamp &r) { return l.compare(r) >= 0; }
 
 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_TimeStamp_h */
