From 0083fa8a944dff1c06ff80e9744cbf6d76d8017b Mon Sep 17 00:00:00 2001
From: Tyler Neely <t@jujit.su>
Date: Thu, 11 Aug 2022 15:28:23 +0000
Subject: [PATCH] Use system_clock instead of local_t

---
 src/io/thrift/thrift_handle.hpp    | 4 ++++
 src/io/thrift/thrift_transport.hpp | 3 +--
 src/io/time.hpp                    | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/io/thrift/thrift_handle.hpp b/src/io/thrift/thrift_handle.hpp
index b9ed0585e..63884e058 100644
--- a/src/io/thrift/thrift_handle.hpp
+++ b/src/io/thrift/thrift_handle.hpp
@@ -11,8 +11,12 @@
 
 #pragma once
 
+#include "io/transport.hpp"
+
 namespace memgraph::io::thrift {
 
+using memgraph::io::Address;
+
 class ThriftHandle {
  public:
   template <Message Request, Message Response>
diff --git a/src/io/thrift/thrift_transport.hpp b/src/io/thrift/thrift_transport.hpp
index 36398d132..676f75423 100644
--- a/src/io/thrift/thrift_transport.hpp
+++ b/src/io/thrift/thrift_transport.hpp
@@ -56,8 +56,7 @@ class ThriftTransport {
 
   Time Now() const {
     auto nano_time = std::chrono::system_clock::now();
-    auto micros = std::chrono::duration_cast<std::chrono::milliseconds>(nano_time);
-    return Time::now();
+    return std::chrono::time_point_cast<std::chrono::microseconds>(nano_time);
   }
 
   bool ShouldShutDown() const { return false; }
diff --git a/src/io/time.hpp b/src/io/time.hpp
index 57f58cab1..b07f90154 100644
--- a/src/io/time.hpp
+++ b/src/io/time.hpp
@@ -16,6 +16,6 @@
 namespace memgraph::io {
 
 using Duration = std::chrono::microseconds;
-using Time = std::chrono::time_point<std::chrono::local_t, Duration>;
+using Time = std::chrono::time_point<std::chrono::system_clock, Duration>;
 
 }  // namespace memgraph::io