php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37616 DATE_RFC822 does not product RFC 822 dates
Submitted: 2006-05-27 21:22 UTC Modified: 2006-06-13 17:46 UTC
From: evert at collab dot nl Assigned: bjori
Status: Closed Package: Date/time related
PHP Version: 5.1.4 OS: Debian
Private report: No CVE-ID:
 [2006-05-27 21:22 UTC] evert at collab dot nl
Description:
------------
The DATE_RFC822 constant does not always produce proper dates

It puts a 'CEST'  time zone identifier in the end of the string, however there are only a few time zone abbriviations that are 'legal' in RFC 822, instead it should show the offset in these cases..

Reproduce code:
---------------
echo(date(RFC822));

Expected result:
----------------
Thu, 25 May 2006 01:11:01 +0100

Actual result:
--------------
Thu, 25 May 2006 01:11:01 CEST

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-27 22:21 UTC] bjori@php.net
Patch (5.2-cvs and HEAD): 
http://php.is/bugs/37616/bug37616.patch.txt
phpdoc: http://php.is/bugs/37616/bug37616.phpdoc.patch.txt

however; I don't quite see the need for this constant as 
RFC2822 "supersedes the one specified in Request For 
Comments (RFC) 822, "Standard for the Format of ARPA 
Internet Text Messages", updating it to reflect current 
practice and incorporating incremental changes that were 
specified in other RFCs."

-Hannes
 [2006-05-30 15:27 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in HEAD & 5_2.

RFC822 uses only 2digits for the year (also fixed)
 [2006-06-13 14:07 UTC] evert at collab dot nl
This bug includes DATE_RSS, forgot to tell, should i open a new bug?
 [2006-06-13 17:40 UTC] bjori@php.net
If you are having problems with the latest cvs 
version(5.2), yes, please open another report.
 [2006-06-13 17:46 UTC] evert at collab dot nl
Haven't checked it myself.. it was still the case in 5.1.4

If DATE_RSS is a reference of some kind to RFC822 then it should be allright..

In any case.. thanks for your quick responses
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 16:02:23 2014 UTC