#29809 [Opn]: strtotime is loosing seconds and minutes and hours info
| From: | never_slept at yahoo dot com | Date: | Tue, 24 Aug 2004 07:24:02 +0000 |
| Subject: | #29809 [Opn]: strtotime is loosing seconds and minutes and hours info | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65145@lists.php.net to get a copy of this message | ||
ID: 29809
User updated by: never_slept at yahoo dot com
Reported By: never_slept at yahoo dot com
Status: Open
Bug Type: Date/time related
Operating System: Suse 9.1
PHP Version: 5.0.1
New Comment:
strtotime is loosing seconds and minutes and hours info when used with
its second argument. The example code should output the same integer
values - but it doesn't. Use getdate on the resulting values and you
find that hours, minutes and seconds got zero'd.
Previous Comments:
------------------------------------------------------------------------
[2004-08-24 09:21:32] never_slept at yahoo dot com
Description:
------------
strtotime is loosing seconds and minutes and hours info when used with
its second argument.
Reproduce code:
---------------
echo strtotime("+10 seconds", strtotime("2004/08/24 12:17:10"));
echo "<br>";
echo strtotime("2004-08-24 12:17:20");
echo "<br>";
echo "<pre>";
print_r(getdate(strtotime("+10 seconds", strtotime("2004/08/24
12:17:10"))));
print_r(getdate(strtotime("2004-08-24 12:17:20")));
echo "</pre>";
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29809&edit=1