Skip to content

Commit

Permalink
Use PHP's DateTime instead of our DateTimeFactory in the TimeLineCont…
Browse files Browse the repository at this point in the history
…roller

I'm about to drop the DateTimeFactory because date_default_timezone_set() in combination w/ PHP's DateTime is sufficient.

refs #6778
  • Loading branch information
lippserd committed May 19, 2015
1 parent 5cf8e25 commit b5a0f79
Showing 1 changed file with 1 addition and 4 deletions.
@@ -1,11 +1,8 @@
<?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */

use \DateTime;
use \DateInterval;
use Icinga\Web\Url;
use Icinga\Util\Format;
use Icinga\Util\DateTimeFactory;
use Icinga\Module\Monitoring\Controller;
use Icinga\Module\Monitoring\Timeline\TimeLine;
use Icinga\Module\Monitoring\Timeline\TimeRange;
Expand Down Expand Up @@ -233,7 +230,7 @@ private function extrapolateDateTime(DateTime &$dateTime)
*/
private function buildTimeRanges()
{
$startTime = DateTimeFactory::create();
$startTime = new DateTime();
$startParam = $this->_request->getParam('start');
$startTimestamp = is_numeric($startParam) ? intval($startParam) : strtotime($startParam);
if ($startTimestamp !== false) {
Expand Down

0 comments on commit b5a0f79

Please sign in to comment.