title: Time zone changing arbitrarily
body: <p>I'm using the gem <a href="https://github.com/ankane/groupdate/" rel="nofollow noreferrer">groupdate</a> to do a query like this in a controller's action: </p>
  
  <pre><code>Event.where.not(user_id: [1, 3]).group_by_week(:created_at, week_start: :mon, last: 13, reverse: true).count
  </code></pre>
  
  <p>Doing a couple of sequential queries by refreshing the webpage changes the SQL query from time to time. What seems to be changing is the app's default time zone, and this happens without me even setting the time zone in this action/view.</p>
  
  <p>What can be the reason for this? How/where could I debug this?</p>
  
  <p>UTC is set in <code>application.rb</code> as default time zone. An example of two different SQL queries caused by the same query above:</p>
  
  <pre><code>SELECT COUNT(*) AS count_all, (DATE_TRUNC('week', (created_at::timestamptz - INTERVAL '0 day' - INTERVAL '0 second') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 day' + INTERVAL '0 second') AT TIME ZONE 'Etc/UTC' AS date_trunc_week_created_at_timestamptz_interval_0_day_interval_ FROM "events" WHERE ("events"."user_id" NOT IN (1, 3, 290, 339)) AND (created_at &gt;= '2017-07-31 00:00:00' AND created_at &lt;= '2017-10-25 22:23:42.184226') GROUP BY (DATE_TRUNC('week', (created_at::timestamptz - INTERVAL '0 day' - INTERVAL '0 second') AT TIME ZONE 'Etc/UTC') + INTERVAL '0 day' + INTERVAL '0 second') AT TIME ZONE 'Etc/UTC'
  
  SELECT COUNT(*) AS count_all, (DATE_TRUNC('week', (created_at::timestamptz - INTERVAL '0 day' - INTERVAL '0 second') AT TIME ZONE 'America/New_York') + INTERVAL '0 day' + INTERVAL '0 second') AT TIME ZONE 'America/New_York' AS date_trunc_week_created_at_timestamptz_interval_0_day_interval_ FROM "events" WHERE ("events"."user_id" NOT IN (1, 3, 290, 339)) AND (created_at &gt;= '2017-07-31 04:00:00' AND created_at &lt;= '2017-10-25 22:24:57.912750') GROUP BY (DATE_TRUNC('week', (created_at::timestamptz - INTERVAL '0 day' - INTERVAL '0 second') AT TIME ZONE 'America/New_York') + INTERVAL '0 day' + INTERVAL '0 second') AT TIME ZONE 'America/New_York'
  </code></pre>