Time spent for subtasks are not rounded too the nearest quarter anymore
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user