title: Convert local TIME_STAMP to UTC time
body: <p>I have two tables with time stamps</p>
  
  <p><code>TABLE1</code> with TIME_STAMP in local time </p>
  
  <p><code>TABLE2</code> with TIME_STAMP in UTC</p>
  
  <p>I need to do something like</p>
  
  <pre><code>    select count(*) from TABLE1 where TIME_STAMP &gt; TABLE2.TIME_STAMP
  </code></pre>
  
  <p>The problem is that this app will be deployed in multiple time zones so I cannot use the following</p>
  
  <pre><code>    SELECT CONVERT_TZ(TABLE2.TIME_STAMP,'EST','UTC')
  </code></pre>
  
  <p>because '<code>EST</code>' can be any time zone.</p>
  
  <p>Is there a way of getting local time zone code and substituting it as second argument?
  Or is there a better and more direct approach to solving my issue?</p>
  
  <p>NOTE: Both TABLE1 and TABLE2 TIME_STAMPS have to remain as local and UTC respectively as they are externals that I have no control over...</p>