[ARVADOS] updated: 1.3.0-2762-g81cc7cad7

Git user git at public.arvados.org
Thu Jul 23 20:55:16 UTC 2020


Summary of changes:
 services/api/config/initializers/time_zone.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  81cc7cad7e7489b80d97490016c2283e7209b4ca (commit)
      from  3ab8fdaa6d7f539e4c4a3e203542474ac2496d2d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 81cc7cad7e7489b80d97490016c2283e7209b4ca
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Thu Jul 23 17:54:32 2020 -0300

    16470: Another way of setting the callback. Let's test on Jenkins. (WIP)
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/services/api/config/initializers/time_zone.rb b/services/api/config/initializers/time_zone.rb
index 7bdbbcf1b..26681d613 100644
--- a/services/api/config/initializers/time_zone.rb
+++ b/services/api/config/initializers/time_zone.rb
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-ActiveRecord::Base.connection.class.set_callback :checkout, :after do
+ActiveRecord::ConnectionAdapters::AbstractAdapter.set_callback :checkout, :before, ->(conn) do
   # If the database connection is in a time zone other than UTC,
   # "timestamp" values don't behave as desired.
   #
@@ -11,5 +11,5 @@ ActiveRecord::Base.connection.class.set_callback :checkout, :after do
   # before now()), but false in time zone -0100 (now() returns an
   # earlier clock time, and its time zone is dropped when comparing to
   # a "timestamp without time zone").
-  raw_connection.sync_exec("SELECT 1")
+  conn.execute("SET TIME ZONE 'UTC'")
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list