diff --git a/src/util/time.hpp b/src/util/time.hpp
index 5e5dc7c..7b42b4a 100644
--- a/src/util/time.hpp
+++ b/src/util/time.hpp
@@ -9,17 +9,28 @@
 #define NDN_TIME_HPP
 
 #include "ndn-cpp-dev/common.hpp"
+#include <boost/date_time/posix_time/posix_time.hpp>
 
 namespace ndn {
 
-MillisecondsSince1970 
-ndn_getNowMilliseconds();
+const boost::posix_time::ptime UNIX_EPOCH_TIME =
+  boost::posix_time::ptime (boost::gregorian::date (1970, boost::gregorian::Jan, 1));
 
-int
-ndn_toIsoString(MillisecondsSince1970 milliseconds, char *isoString);
+/**
+ * @brief Get the current time in milliseconds since 1/1/1970, including fractions of a millisecond
+ */
+inline MillisecondsSince1970 
+getNowMilliseconds()
+{
+  return (boost::posix_time::microsec_clock::universal_time() - UNIX_EPOCH_TIME).total_milliseconds();
+}
 
-int
-ndn_fromIsoString(const char* isoString, MillisecondsSince1970 *milliseconds);
+inline MillisecondsSince1970 
+ndn_getNowMilliseconds()
+{
+  return getNowMilliseconds();
+}
+
 
 /**
  * Convert to the ISO string representation of the time.
@@ -29,12 +40,13 @@
 inline std::string
 toIsoString(const MillisecondsSince1970& time)
 {
-  char isoString[25];
-  int error;
-  if ((error = ndn_toIsoString(time, isoString)))
-    throw std::runtime_error("toIsoString");
-  
-  return isoString;
+  boost::posix_time::ptime boostTime = UNIX_EPOCH_TIME + boost::posix_time::milliseconds(time);
+
+  /// @todo Determine whether this is necessary at all
+  if ((time % 1000) == 0)
+    return boost::posix_time::to_iso_string(boostTime) + ".000000"; 
+  else
+    return boost::posix_time::to_iso_string(boostTime);
 }
   
 /**
@@ -45,12 +57,9 @@
 inline MillisecondsSince1970
 fromIsoString(const std::string& isoString)
 {
-  MillisecondsSince1970 milliseconds;
-  int error;
-  if ((error = ndn_fromIsoString(isoString.c_str(), &milliseconds)))
-    throw std::runtime_error("fromIsoString");
+  boost::posix_time::ptime boostTime = boost::posix_time::from_iso_string(isoString);
   
-  return milliseconds;
+  return (boostTime-UNIX_EPOCH_TIME).total_milliseconds();
 }
 
 } // namespace ndn
