From 629cc22e8dc5e2e0299f242cb071ad4962e1e754 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 13 Nov 2013 12:49:30 +0100 Subject: [PATCH] [UPDATE] Do not use DateTime class, use time() --- public/include/pages/statistics/pool.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 0252f1fb..e23a3e17 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -34,9 +34,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $iCurrentPoolHashrate > 0 ? $iEstTime = $dDifficulty * pow(2,32) / ($iCurrentPoolHashrate * 1000) : $iEstTime = 0; // Time since last block - $now = new DateTime( "now" ); if (!empty($aBlockData)) { - $dTimeSinceLast = ($now->getTimestamp() - $aBlockData['time']); + $dTimeSinceLast = (time() - $aBlockData['time']); if ($dTimeSinceLast < 0) $dTimeSinceLast = 0; } else { $dTimeSinceLast = 0; @@ -45,7 +44,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { // Past blocks found, max 4 weeks back $iFoundBlocksByTime = $statistics->getLastBlocksbyTime(); $iFirstBlockFound = $statistics->getFirstBlockFound(); - $iTimeSinceFirstBlockFound = ($now->getTimestamp() - $iFirstBlockFound); + $iTimeSinceFirstBlockFound = (time() - $iFirstBlockFound); // Propagate content our template $smarty->assign("FIRSTBLOCKFOUND", $iTimeSinceFirstBlockFound);