Doc #54271 [Opn->Bgs]: 12/24 formating of getdate()
| From: | salathe@php.net | Date: | Wed, 16 Mar 2011 13:20:48 +0000 |
| Subject: | Doc #54271 [Opn->Bgs]: 12/24 formating of getdate() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6084@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54271&edit=1
ID: 54271
Updated by: salathe@php.net
Reported by: martin dot meridius at gmail dot com
Summary: 12/24 formating of getdate()
-Status: Open
+Status: Bogus
Type: Documentation Problem
Package: Date/time related
Operating System: Ubuntu 10.10
PHP Version: 5.3SVN-2011-03-16 (SVN)
Block user comment: N
Private report: N
New Comment:
It returns 24-hour values as documented.
php > print_r(getdate(1234567890));
Array
(
[seconds] => 30
[minutes] => 31
[hours] => 23
[mday] => 13
[wday] => 5
[mon] => 2
[year] => 2009
[yday] => 43
[weekday] => Friday
[month] => February
[0] => 1234567890
)
Previous Comments:
------------------------------------------------------------------------
[2011-03-16 14:20:07] rquadling@php.net
Can you run show the entire output of ...
php -r "print_r(getdate());"
please?
------------------------------------------------------------------------
[2011-03-16 13:45:23] martin dot meridius at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.getdate#Return
Values
---
PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011
16:07:38)
$today = getdate();
$today[hours];
Returns 12-hours formatted, not 0 to 23 as described in documentation.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54271&edit=1