From 1b6b1cc5e6e26a3e3081cdd9613508a66c3751ee Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 31 Aug 2016 21:32:29 -0400 Subject: Time spent for subtasks are not rounded too the nearest quarter anymore --- app/Core/DateParser.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'app/Core/DateParser.php') diff --git a/app/Core/DateParser.php b/app/Core/DateParser.php index 5d770241..b9aa9230 100644 --- a/app/Core/DateParser.php +++ b/app/Core/DateParser.php @@ -239,22 +239,10 @@ class DateParser extends Base */ public function getHours(DateTime $d1, DateTime $d2) { - $seconds = $this->getRoundedSeconds(abs($d1->getTimestamp() - $d2->getTimestamp())); + $seconds = abs($d1->getTimestamp() - $d2->getTimestamp()); return round($seconds / 3600, 2); } - /** - * Round the timestamp to the nearest quarter - * - * @access public - * @param integer $seconds Timestamp - * @return integer - */ - public function getRoundedSeconds($seconds) - { - return (int) round($seconds / (15 * 60)) * (15 * 60); - } - /** * Get ISO-8601 date from user input * -- cgit v1.2.3