title: Best way to get unix timestamp for current UTC time in MySQL
body: <p>I've been trying to use the following in mySQL to create a unix stamp for current UTC time</p>
  
  <pre><code>UNIX_TIMESTAMP(UTC_TIMESTAMP())
  </code></pre>
  
  <p>When I execute the query and get the result, it seems like mySQL is doing UTC conversation twice.</p>
  
  <pre><code>Eg. local time 9:07PM
  </code></pre>
  
  <p>Query above returned:
  <code>1374390482</code>, which is next day <code>07:08:02 GMT</code>, which is correct,</p>
  
  <p>However, <code>UNIX_TIMESTAMP(LOCALTIMESTAMP())</code> returns: </p>
  
  <pre><code>1374372551 02:09:11 GMT
  </code></pre>
  
  <p>which is the correct UTC unix timestamp.</p>
  
  <p>So <code>UNIX_TIMESTAMP</code> automatically translates the date object's timezone to UTC (regardless if it's already UTC or not?)</p>
  
  <p>Is there a better way or a single command just to get a UTC unix timestamp in mySQL?</p>