From: Radhika Chippada Date: Wed, 18 Mar 2015 13:38:26 +0000 (-0400) Subject: 5383: Add back Time.parse(). Without it the value returned would be of the format... X-Git-Tag: 1.1.0~1736^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/9917d9eef58c161420fe119f19611d332a345507 5383: Add back Time.parse(). Without it the value returned would be of the format 2015-03-18 13:37:11 UTC, and with Time.parse it would be 2015-03-18 09:37:11 -0400, which is the same as Time.now. --- diff --git a/services/api/lib/db_current_time.rb b/services/api/lib/db_current_time.rb index 5c97baa66e..b4a6423546 100644 --- a/services/api/lib/db_current_time.rb +++ b/services/api/lib/db_current_time.rb @@ -2,6 +2,6 @@ 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