From:             d dot begley at uws dot edu dot au
Operating system: Solaris 9 (SPARC)
PHP version:      5.1.2
PHP Bug Type:     Date/time related
Bug description:  DATE_W3C format constant incorrect

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

-- 
Edit bug report at http://bugs.php.net/?id=36599&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36599&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36599&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36599&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36599&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36599&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36599&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36599&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36599&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36599&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36599&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36599&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36599&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36599&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36599&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36599&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36599&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36599&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36599&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36599&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36599&r=mysqlcfg

Reply via email to