#29809 [Bgs]: strtotime is loosing seconds and minutes and hours info
ID: 29809 User updated by: never_slept at yahoo dot com Reported By: never_slept at yahoo dot com Status: Bogus Bug Type: Date/time related Operating System: Suse 9.1 PHP Version: 5.0.1 New Comment: 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. Previous Comments: [2004-08-24 09:29:01] [EMAIL PROTECTED] Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Duplicate of #29557 [2004-08-24 09:24:00] never_slept at yahoo dot com 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. [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 ""; echo strtotime("2004-08-24 12:17:20"); echo ""; echo ""; print_r(getdate(strtotime("+10 seconds", strtotime("2004/08/24 12:17:10"; print_r(getdate(strtotime("2004-08-24 12:17:20"))); echo ""; -- Edit this bug report at http://bugs.php.net/?id=29809&edit=1
#29557 [Com]: strtotime error
ID: 29557 Comment by: never_slept at yahoo dot com Reported By: javier at evaloportunidades dot insp dot mx Status: Open Bug Type: *General Issues Operating System: Debian GNU/Linux 3.0 2.6.7 PHP Version: 5.0.0 New Comment: 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() Previous Comments: [2004-08-23 06:01:05] cplee at buzzcity dot com The problem still exists in 5.0.1! Anyway, the problem lies in some "conditions" being commented in the ext/standard/parsedate.y (and parsedate.c) under the php_parse_date() function. (parsedate.y:1082, parsedate.c: 2325). I basically uncomment those lines and did a recompile. Now the following command gives the correct result: Command: php -r 'echo strtotime("now");' Result: 1093234981 Hope this helps! --cp [2004-08-09 09:33:14] [EMAIL PROTECTED] "now" returns midnight of the current day. I think this is wrong too. [2004-08-09 09:12:44] javier at evaloportunidades dot insp dot mx But the problem is that even after n seconds with PHP 5.0.0 I get the same result. [2004-08-08 23:04:54] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The code takes <1 second to run, so of course the timestamp with 1 second precision will be the same. [2004-08-07 00:10:46] javier at evaloportunidades dot insp dot mx Description: We use the strtotime function to get a value that is used as primary key on a database table. But with PHP 5.0.0 the strtotime function is returning duplicate values. Here is the configure line: --- './configure' '--disable-cli' '--disable-cgi' '--without-pear' '--without-mysql' '--with-pgsql' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-memory-limit' --- With PHP 4 we didn't face this problem. Cheers, Javier Reproduce code: --- "; } ?> Actual result: -- 1091768400 1091768400 1091768400 1091768400 1091768400 1091768400 1091768400 1091768400 1091768400 1091768400 -- Edit this bug report at http://bugs.php.net/?id=29557&edit=1
#29809 [Opn]: strtotime is loosing seconds and minutes and hours info
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 ""; echo strtotime("2004-08-24 12:17:20"); echo ""; echo ""; print_r(getdate(strtotime("+10 seconds", strtotime("2004/08/24 12:17:10"; print_r(getdate(strtotime("2004-08-24 12:17:20"))); echo ""; -- Edit this bug report at http://bugs.php.net/?id=29809&edit=1
#29809 [NEW]: strtotime is loosing seconds and minutes and hours info
From: never_slept at yahoo dot com Operating system: Suse 9.1 PHP version: 5.0.1 PHP Bug Type: Date/time related Bug description: strtotime is loosing seconds and minutes and hours info 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 ""; echo strtotime("2004-08-24 12:17:20"); echo ""; echo ""; print_r(getdate(strtotime("+10 seconds", strtotime("2004/08/24 12:17:10"; print_r(getdate(strtotime("2004-08-24 12:17:20"))); echo ""; -- Edit bug report at http://bugs.php.net/?id=29809&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29809&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29809&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29809&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=29809&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=29809&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29809&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29809&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29809&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29809&r=support Expected behavior: http://bugs.php.net/fix.php?id=29809&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29809&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29809&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=29809&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29809&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=29809&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29809&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29809&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29809&r=float