From 9917d9eef58c161420fe119f19611d332a345507 Mon Sep 17 00:00:00 2001 From: Radhika Chippada Date: Wed, 18 Mar 2015 09:38:26 -0400 Subject: [PATCH] 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. --- services/api/lib/db_current_time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2