13493: Update CORS OPTIONS test.
[arvados.git] / services / api / lib / db_current_time.rb
index 5c97baa66e0a217b178d66cb16c35bc446395ed8..fdb66415210aed9b95338f6dafc6e377de45ec50 100644 (file)
@@ -1,7 +1,11 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 module DbCurrentTime
   CURRENT_TIME_SQL = "SELECT clock_timestamp()"
 
   def db_current_time
-    ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL).to_time
+    Time.parse(ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL)).to_time
   end
 end