projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21205: Now adds the final part of the uuid to make the name unique
[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 5e1634ecb96f17661002afc3eb62dea44100adad..2d58e3c3894fc0ccf35732fa8d28096672bfdf9c 100644
(file)
--- a/
services/api/lib/db_current_time.rb
+++ b/
services/api/lib/db_current_time.rb
@@
-6,10
+6,10
@@
module DbCurrentTime
CURRENT_TIME_SQL = "SELECT clock_timestamp() AT TIME ZONE 'UTC'"
def db_current_time
CURRENT_TIME_SQL = "SELECT clock_timestamp() AT TIME ZONE 'UTC'"
def db_current_time
-
Time.parse(ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL) + " +0000"
)
+
ActiveRecord::Base.connection.select_value(CURRENT_TIME_SQL
)
end
def db_transaction_time
end
def db_transaction_time
-
Time.parse(ActiveRecord::Base.connection.select_value("SELECT current_timestamp AT TIME ZONE 'UTC'") + " +0000
")
+
ActiveRecord::Base.connection.select_value("SELECT current_timestamp AT TIME ZONE 'UTC'
")
end
end
end
end