title: Where is PHP's gmtime()?
body: <p>There are two standard C lib functions <a href="http://linux.die.net/man/3/gmtime" rel="nofollow">gmtime() and localtime()</a>. They both return a struct like this (one in GMT, one in local TZ and daylight savings time):</p>
  
  <pre><code>struct tm {
      int tm_sec;         /* seconds */
      int tm_min;         /* minutes */
      int tm_hour;        /* hours */
      int tm_mday;        /* day of the month */
      int tm_mon;         /* month */
      int tm_year;        /* year */
      int tm_wday;        /* day of the week */
      int tm_yday;        /* day in the year */
      int tm_isdst;       /* daylight saving time */
  };
  </code></pre>
  
  <p>PHP has a wrapper over <a href="http://php.net/manual/en/function.localtime.php" rel="nofollow">localtime()</a>, but to the best of my knowledge not gmtime(). What am I missing? Where PHP's gmtime() wrapper?</p>
  
  <p>I did find one really old request for a PHP gmtime() - <a href="https://bugs.php.net/bug.php?id=576&amp;edit=1" rel="nofollow">https://bugs.php.net/bug.php?id=576&amp;edit=1</a>. But it's closed and dismissed as not needed. I don't agree.</p>
  
  <p>I Don't <em>need</em> it. But conversion of a <code>struct tm</code> from local time to GMT is not trivial (AFAIK), so it would be nice to have. As nice as having localtime().</p>