#24929 [Opn->Csd]: date("G") returns nothing
| From: | sniper@php.net | Date: | Mon, 04 Aug 2003 15:55:15 +0000 |
| Subject: | #24929 [Opn->Csd]: date("G") returns nothing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-45326@lists.php.net to get a copy of this message | ||
ID: 24929
Updated by: sniper@php.net
Reported By: sean at shrum dot net
-Status: Open
+Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.3.2
New Comment:
Using latest CVS:
[jani@rh62 jani]$ date
Mon Aug 4 18:54:40 EEST 2003
[jani@rh62 jani]$ php -r '$offset = strtotime("+3 hours"); echo
$offset,"\n",date("G", $offset);'
1060023283
21
No bug here.
Previous Comments:
------------------------------------------------------------------------
[2003-08-04 01:56:13] sean at shrum dot net
Description:
------------
I get nothing back from the date("G") function call. Granted, I am
using a offset value with it but the offset works with every other date
call so I know the offset value is not the cause
Reproduce code:
---------------
$offset = strtotime("+3 hours");
$time_vars["hour_24"] = date("G", $offset);
Expected result:
----------------
$time_vars["hour_24"] should have the current hour in 24-hour format
without leading zeros. If it is 1 am, the result should be "4" (due to
the offset). If it is 5 pm, the result should be "22" (due to the
offset).
Actual result:
--------------
nothing; blank value
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24929&edit=1