title: Best GMT time configuration by user | PHP
body: <p>I was wondering how to do the best user configuration when the user sets his own GMT time, e.g. if a user was in the GMT+3 timezone and the user sets it via the UCP.</p>
  
  <p>What I've done was, every option in the drop-down menu:</p>
  
  <pre><code>&lt;select name="timezone"&gt;
      ...
      &lt;option value="-7200"&gt;GMT-2&lt;/option&gt;
      &lt;option value="-3600"&gt;GMT-1&lt;/option&gt;
      &lt;option value="0"&gt;GMT&lt;/option&gt;
      &lt;option value="3600"&gt;GMT+1&lt;/option&gt;
      &lt;option value="7200"&gt;GMT+2&lt;/option&gt;
      ...
  &lt;/select&gt;
  </code></pre>
  
  <p>Like that, and when the user chooses it, it will add the value into his user field in the database.</p>
  
  <p>What I'm stuck on is when a post has been created by a user, it uses the time() stamp, and I use the gmdate() function which is this:</p>
  
  <pre><code>while(loop goes here)
  {
      $post_time = $row['post_time'] // e.g. 1282165261
  
      if($row['user_timezone'] &gt; 0)
      {
          $timezone = $post_time-$row['user_timezone'];
      }
      else
      {
          $timezone = $post_time+$row['user_timezone'];
      }
  }
  </code></pre>
  
  <p>Which is outputted with this timestamp format:</p>
  
  <pre><code>gmdate("D jS M Y @ g:iA", $timezone);
  </code></pre>
  
  <p>But the problem is, if I use something below than GMT, e.g. GMT-1, GMT-6, it changes to +</p>
  
  <p>The question is, what would be the best way to configure timestamps to the user preferred GMT time?</p>