ID: 36598 Updated by: [EMAIL PROTECTED] Reported By: d dot begley at uws dot edu dot au Status: Open Bug Type: Documentation problem Operating System: Solaris 9 (SPARC) PHP Version: Irrelevant New Comment:
The documentation for DATE_ATOM is correct, the one for DATE_W3C isn't. I will fix the code in a bit too. Previous Comments: ------------------------------------------------------------------------ [2006-03-03 06:06:51] d dot begley at uws dot edu dot au 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 this bug report at http://bugs.php.net/?id=36598&edit=1