title: JDBC SQL Time zone
body: <p>I'm using Spring with apache commons BasicDataSource.</p>
  
  <p>The time zone shows as GMT via:</p>
  
  <pre><code>SELECT @@global.time_zone, @@session.time_zone;
  </code></pre>
  
  <p>My input is in epoch time, 1386831420000 and 1386833220000, so the query should be like this:</p>
  
  <pre><code>SELECT * FROM table WHERE AND arrival_time BETWEEN '2013-12-12 06:57:00' AND '2013-12-12 07:27:00';
  </code></pre>
  
  <p>I enabled SQL profiing, and this is the query that actually gets executed, so I don't get the correct results:</p>
  
  <pre><code>SELECT * FROM table WHERE AND arrival_time BETWEEN '2013-12-12 01:57:00' AND '2013-12-12 02:27:00';
  </code></pre>
  
  <p>Notice that the times are off by 5 hours, since I am EST-5, and the time should be in GMT.</p>
  
  <p><strong>My question is: How can I tell MySQL or Spring JDBC not to use the client time zone, and simply to always use GMT?</strong></p>
  
  <p>Please comment if there is any detail I could add to solve the issue.</p>