title: The date/time format used in HTTP headers
body: <p>Which RFC describes the format used for date/time in the modern time HTTP headers, like "Last-Modified" and "If-Modified-Since", and how to generate a date/time string in PHP according to such format?</p>
  
  <p>Some sources point to RFC 2822, which, as indicated by <a href="http://www.php.net/manual/en/class.datetime.php" rel="noreferrer">DateTime</a> class, is using <code>D, d M Y H:i:s O</code> format, but from my tests, this format produces <code>+0000</code> instead of <code>GMT</code> at the end. I tried other timezone specifiers but none of them seems to put <code>GMT</code> at the end, the closest result I got was with <code>UTC</code>. However, as was shown by Firebug, all sites are using <code>GMT</code> in HTTP headers and not <code>+0000</code> or <code>UTC</code>.</p>
  
  <p>So what format is really used and how do I format date/time in the same way as other sites do?</p>