#36598 [NEW]: incorrect example for date() constant
| From: | d dot begley at uws dot edu dot au | Date: | Fri, 03 Mar 2006 05:06:52 +0000 |
| Subject: | #36598 [NEW]: incorrect example for date() constant | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969372191@lists.php.net to get a copy of this message | ||
From: d dot begley at uws dot edu dot au
Operating system: Solaris 9 (SPARC)
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: incorrect example for date() constant
Description:
------------
The documentation for date() gives a number of examples for the new
constants added in PHP 5.1.1:
http://www.php.net/manual/en/ref.datetime.php
The first example:
DATE_ATOM (string)
Atom (example: 2005-08-15T15:52:01+00:00)
is incorrect - the actual output has no colon in the timezone offset
(though I believe one is missing from the W3C format, though I'll file a
separate bug for that).
Reproduce code:
---------------
Simple function call:
date( DATE_ATOM, getlastmod() )
produces output of the form:
2006-03-03T15:41:46+1100
which according to the documentation should be:
2006-03-03T15:41:46+11:00
(ie., colon in timezone offset). The documentation and code are
inconsistent.
Expected result:
----------------
See "reproduce code" section; expected output (as per documentation) is:
2006-03-03T15:41:46+11:00
Actual result:
--------------
See "reproduce code" section; actual result is:
2006-03-03T15:41:46+1100
--
Edit bug report at http://bugs.php.net/?id=36598&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36598&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36598&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36598&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36598&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36598&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36598&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36598&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36598&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36598&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36598&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36598&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36598&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36598&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36598&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36598&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36598&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36598&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36598&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36598&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36598&r=mysqlcfg