note 25030 deleted from function.date by sniper
| From: | sniper@php.net | Date: | Sat, 11 Oct 2003 16:50:38 +0000 |
| Subject: | note 25030 deleted from function.date by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58264@lists.php.net to get a copy of this message | ||
Note Submitter:
----
In HTTP Headers, the HTTP/1.1 specification mandates the use of the RFC1123 format for dates:
'D, d M Y H:i:s \G\M\T'
For example:
Sun, 06 Nov 1994 08:49:37 GMT
(RFC 822, updated by RFC 1123)
See RFC2616, Section 3.3.1 "Full Date", page 19.
Do not use date() but gmdate() to create such formats, using GMT date and time:
header('Date: ' . gmdate('D, d M Y H:i:s \G\M\T'));
header(Last-Modified: ' . gmdate('D, d M Y H:i:s \G\M\T'));