|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-08-24 09:21 UTC] 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>";
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 13:00:01 2025 UTC |
Yes I read that bug report and although them sounded to potentially be the same thing... my strtotime("now") does in fact spit out a different value every second and that bug report makes no mention of using the second argument for strtotime(). So please reconsider carefully if this is really a duplicate. Seeing as you took all of a couple of minutes last time.