objnoob Posted November 22, 2010 Share Posted November 22, 2010 I'm using microtime to capture $start_time and $finish_time bothing using microtime() function. I then pass both $start_time and $finish_time into date() function to parse a date. The difference between $start_time and $finish_time is also calculated. The problem being the date() function is producing incorrect values. list($total_count, $success_count, $errors_data, $start_time, $finish_time) = $summary_data; $duration_time = $finish_time - $start_time; echo "<b>Started Processing At:</b> ".date('m/d/Y H:i:m', $start_time)."<br/>"; echo "<b>Completed Processing At:</b> ".date('m/d/Y H:i:m', $finish_time)."<br/>"; echo "<b>Processing Duration:</b> $duration_time seconds<br/><br/>"; The output: Started Processing At: 11/22/2010 18:45:11 Completed Processing At: 11/22/2010 18:45:11 Processing Duration: 8.0499620437622 seconds Quote Link to comment https://forums.phpfreaks.com/topic/219516-problems-with-microtime-and-date-functions/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 23, 2010 Share Posted November 23, 2010 H:i:m is hours, minutes, month Quote Link to comment https://forums.phpfreaks.com/topic/219516-problems-with-microtime-and-date-functions/#findComment-1138181 Share on other sites More sharing options...
objnoob Posted November 23, 2010 Author Share Posted November 23, 2010 How the hell did I accomplish that? Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/219516-problems-with-microtime-and-date-functions/#findComment-1138185 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.