X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/18148ec24bf63ec3353a2cd38f6f07c460037db2..644f5de63e2b8b02e054fcbb3e9af39560cffae3:/services/api/lib/db_current_time.rb diff --git a/services/api/lib/db_current_time.rb b/services/api/lib/db_current_time.rb index 5c97baa66e..fdb6641521 100644 --- a/services/api/lib/db_current_time.rb +++ b/services/api/lib/db_current_time.rb @@ -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