title: working with timestamps and time zones
body: <p>From my android smartphone application (made by myself) I send a request to a server in Denver to save my location and time. The <code>TIMESTAMP</code> it saves is Denver's current time (9 hours difference from local time). Now after 16 hours from the last request I wrote in my php script</p>
  
  <pre><code>$query = "SELECT * FROM `tblLoc` WHERE datetime &gt; (CURRENT_TIMESTAMP - 86400)";
  </code></pre>
  
  <p>so as if I wanted to show me past 24 hours....</p>
  
  <p>THIS WAS MISTAKE!</p>
  
  <pre><code>$query = "SELECT * FROM `tblLoc` WHERE datetime &gt; CURRENT_TIMESTAMP() - INTERVAL 24 HOUR";
  </code></pre>
  
  <p>in SQL 86400 != 24 HOUR!!!</p>