From e10055bfdc62a12ac6bd00db516b74f9750c276c Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Mon, 26 May 2014 11:02:45 -0400 Subject: [PATCH] update.php: Correctly report durations >= 1 hour Bug: T67772 Change-Id: I61492a1ad8bf7f574b198af82799b030221bb58b --- maintenance/update.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/maintenance/update.php b/maintenance/update.php index 6e93011bce..0fd1fd82e3 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -161,7 +161,7 @@ class UpdateMediaWiki extends Maintenance { wfCountDown( 5 ); } - $time1 = new MWTimestamp(); + $time1 = microtime( true ); $shared = $this->hasOption( 'doshared' ); @@ -197,9 +197,10 @@ class UpdateMediaWiki extends Maintenance { $updater->purgeCache(); } - $time2 = new MWTimestamp(); - $timeDiff = $time2->diff( $time1 ); - $this->output( "\nDone in " . $timeDiff->format( "%i:%S" ) . ".\n" ); + $time2 = microtime( true ); + + $timeDiff = $wgLang->formatTimePeriod( $time2 - $time1 ); + $this->output( "\nDone in $timeDiff.\n" ); } function afterFinalSetup() { -- 2.20.1