|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36599 DATE_W3C format constant incorrect
Submitted: 2006-03-03 06:15 UTC Modified: 2006-03-03 08:54 UTC
From: d dot begley at uws dot edu dot au Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.1.2 OS: Solaris 9 (SPARC)
Private report: No CVE-ID: None
 [2006-03-03 06:15 UTC] d dot begley at uws dot edu dot au
The new date() format constants introduced in PHP 5.1.1:

include a format called DATE_W3C, for which the example shown is:


Whilst this matches the output of live code in PHP, the actual format of the timezone offset is missing a colon (as per the oft-quoted W3C tech note).  I know adding a colon seems "wrong", but that's what the W3C doc includes:

I came across this as the "standard" W3C format (I know the doc itself isn't a standard) because other specs (such as Dublin Core Metadata) refer to the above URL for format information - therefore, the colon must be "significant", no matter how "wrong" it seems.

Reproduce code:
date( DATE_W3C, getlastmod() )

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-03 08:54 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:25 2019 UTC