title: mysql unix_timestamp timezone wrong time
body: <p>having a problem with UNIX_TIMESTAMP function in mysql.</p>
  
  <p><strong>The setup:</strong>
  I am doing a wordpress site on my local windows machine and upload my updates to an ubuntu server(page.ly) periodically. There is a piece of code that retrieves a datetime column from a mysql db. The problem is the time retrieved is right on my local windows machine, but wrong on the ubuntu server.</p>
  
  <p><strong>What i know so far</strong>
  I ran several queries on both places to try to reproduce the problem.</p>
  
  <pre><code>$wpdb-&gt;get_row("SELECT UNIX_TIMESTAMP('2012-07-27 22:15:00') 
  FROM {$wpdb-&gt;posts}"))
  </code></pre>
  
  <p>this produces the right time my local machine(<strong>1343427300</strong>), but wrong on ubuntu(<strong>1343445300</strong> 5 hours ahead. my local timezone America/New_York.).</p>
  
  <pre><code>$wpdb-&gt;get_row("SELECT UNIX_TIMESTAMP('2012-07-27 22:15:00')"))
  </code></pre>
  
  <p>this produces the right time on both machines. it's like as soon as i associate my select with a table, any table in the database, the time gets the timezone offset + daylight savings offset. i checked the timezone offset on both machines. both of them are 0. im kinda stuck here. appreciate any help.</p>