Skip to content

Commit

Permalink
setting database session time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
Azitabh Ajit committed Jan 10, 2014
1 parent caa981d commit 6784d41
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,12 @@ def configure_connection
# Turn this off. http://dev.rubyonrails.org/ticket/6778
variables[:sql_auto_is_null] = 0

if ActiveRecord::Base.default_timezone.eql?:utc
variables[:time_zone] = '+00:00'
else
variables[:time_zone] = DateTime.now.zone
end

# Increase timeout so the server doesn't disconnect us.
wait_timeout = @config[:wait_timeout]
wait_timeout = 2147483 unless wait_timeout.is_a?(Fixnum)
Expand Down

0 comments on commit 6784d41

Please sign in to comment.