CWL spec -> CWL standards
[arvados.git] / services / api / lib / db_current_time.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 module DbCurrentTime
6   CURRENT_TIME_SQL = "SELECT clock_timestamp()"
7
8   def db_current_time
9     Time.parse(ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL)).to_time
10   end
11 end