From 5cde533d5ab7ef53adc2fd9234b8255cccd317da Mon Sep 17 00:00:00 2001 From: dg9vh Date: Thu, 3 Nov 2016 20:46:07 +0000 Subject: [PATCH] fixed duration calculation --- txinfo.php | 6 +++--- version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/txinfo.php b/txinfo.php index 8ea3305..9665748 100644 --- a/txinfo.php +++ b/txinfo.php @@ -57,9 +57,9 @@ foreach ($lastHeard as $listElem) { }else{ echo"$listElem[5]"; } - $UTC = new DateTimeZone("UTC"); - $d1 = new DateTime($listElem[0], $UTC); - $d2 = new DateTime('now', $UTC); + $tz = new DateTimeZone(TIMEZONE); + $d1 = new DateTime($listElem[0], $tz); + $d2 = new DateTime('now', $tz); $diff = $d2->getTimestamp() - $d1->getTimestamp(); echo"$diff s"; } diff --git a/version.php b/version.php index bfcdd6a..281ff51 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@