projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16263: Add local_user_list flag to bypass LoginCluster behavior
[arvados.git]
/
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 120d5a406af41f9a50b10a0e0b7ff576a0bd0499..fdb66415210aed9b95338f6dafc6e377de45ec50 100644
(file)
--- 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
module DbCurrentTime
- CURRENT_TIME_SQL = "SELECT
CURRENT_TIMESTAMP
"
+ CURRENT_TIME_SQL = "SELECT
clock_timestamp()
"
def db_current_time
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
end
end