possible bug in date()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to create a date with the DATE_W3C or DATE_ATOM format (they are the same format according to the examples), but the output of date doesn't match the example in the documentation.

The http://us3.php.net/manual/en/ref.datetime.php page says the formats are as follows:

DATE_ATOM (string)
Atom (example: 2005-08-15T15:52:01+00:00)

DATE_W3C (string)
World Wide Web Consortium (example: 2005-08-15T15:52:01+00:00)

DATE_ISO8601 (string)
ISO-8601 (example: 2005-08-15T15:52:01+0000)


If I create a date with this code:

    $this->dateCreated = date( DATE_ATOM, mktime( 0, 0, 0, 23, 2, 2006 ) );
    echo $this->dateCreated;

I expect to see:

    2006-02-23T00:00:00-08:00

The output I actually get is the ISO-8601 format:

    2006-02-23T00:00:00-0800

The only difference is the colon in the GMT offset at the end.

Is the example output in the web page wrong? Or is this a bug in PHP?

Thanks,

Mark

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux