PHP :: Bug #36599 :: DATE_W3C format constant incorrect
| 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
Description: ------------ The new date() format constants introduced in PHP 5.1.1: http://www.php.net/manual/en/ref.datetime.php include a format called DATE_W3C, for which the example shown is: 2005-08-15T15:52:01+0000 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: http://www.w3.org/TR/NOTE-datetime 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: ---------------- 2006-03-03T15:41:46+11:00 Actual result: -------------- 2006-03-03T15:41:46+1100
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-03-03 08:54 UTC] derick@php.net