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

Reply via email to