X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/beebf2cbe5edc986e1a268fabdd10a3f710dedd4..eeef002557bc361a10483d1924c49e35e8a23fde:/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