title: How can I set UNIX_TIMESTAMP correctly on my local?
body: <p>I have a table which has a column named <code>date_time</code>. It is containing a unix number of the time. Something like this:</p>
  
  <pre><code>// mytable
  +----+------------+
  | id | date_time  |
  +----+------------+
  | 1  | 1464499385 | -- 19 days ago
  +----+------------+
  --                     ^ these are based on current time which is 1464566088
  </code></pre>
  
  <p>Also here is my query:</p>
  
  <pre><code>SELECT id,
         (CASE WHEN FROM_UNIXTIME(date_time) &gt;= CURDATE() THEN 'today'
               WHEN FROM_UNIXTIME(date_time) &gt;= DATE_SUB(CURDATE(), INTERVAL 1 DAY) THEN 'yesteray'
               WHEN FROM_UNIXTIME(date_time) &gt;= DATE_SUB(CURDATE(), INTERVAL 7 DAY) THEN 'in last week'
               ELSE 'in last month or more'
          END) as `range`
  FROM mytable
  WHERE 1;
  </code></pre>
  
  <hr>
  
  <p>The result of query above <em>on local</em> isn't the same as <a href="http://www.sqlfiddle.com/#!9/f9803/1" rel="nofollow noreferrer"><em>on fiddle</em></a>.</p>
  
  <p>on local: <a href="https://i.stack.imgur.com/Cp9Xf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cp9Xf.png" alt="enter image description here"></a></p>
  
  <p>As you see the result on local is <code>yesterday</code> and on fiddle is <code>today</code>. Why there is a different and how can I fix it?</p>
  
  <hr>
  
  <p><strong>Note:</strong> when I select <code>UNIX_TIMESTAMP</code> on local and on fiddle, there is a different.</p>
  
  <pre><code>SELECT UNIX_TIMESTAMP(); -- 1464566511 (on local)
  SELECT UNIX_TIMESTAMP(); -- 1464562972 (on fiddle)
  </code></pre>
  
  <p>So how can I set identically?</p>