diff --git a/library/Icinga/Web/Widget/Chart/HistoryColorGrid.php b/library/Icinga/Web/Widget/Chart/HistoryColorGrid.php index d1c9a677f..efaa02a5b 100644 --- a/library/Icinga/Web/Widget/Chart/HistoryColorGrid.php +++ b/library/Icinga/Web/Widget/Chart/HistoryColorGrid.php @@ -3,10 +3,10 @@ namespace Icinga\Web\Widget\Chart; -use Icinga\Util\DateTimeFactory; +use DateInterval; +use DateTime; use Icinga\Util\Color; use Icinga\Web\Widget\AbstractWidget; -use DateInterval; /** * Display a colored grid that visualizes a set of values for each day @@ -312,7 +312,7 @@ class HistoryColorGrid extends AbstractWidget { private function monthName($month, $year) { // TODO: find a way to render years without messing up the layout - $dt = DateTimeFactory::create($year . '-' . $month . '-01'); + $dt = new DateTime($year . '-' . $month . '-01'); return $dt->format('M'); } @@ -323,7 +323,7 @@ class HistoryColorGrid extends AbstractWidget { */ private function weekdayName($weekday) { - $sun = DateTimeFactory::create('last Sunday'); + $sun = new DateTime('last Sunday'); $interval = new DateInterval('P' . $weekday . 'D'); $sun->add($interval); return substr($sun->format('D'), 0, 2);