diff --git a/compass/resources/views/map.blade.php b/compass/resources/views/map.blade.php index d60d624..3afd093 100644 --- a/compass/resources/views/map.blade.php +++ b/compass/resources/views/map.blade.php @@ -33,9 +33,18 @@
timezone); + } catch(Exception $e) { + $tz = new DateTimeZone('UTC'); + } + + $start = new DateTime($database->created_at); $end = new DateTime(); - $end->setTimeZone(new DateTimeZone($database->timezone)); + $start->setTimeZone($tz); + $end->setTimeZone($tz); + $i = clone $start; while((int)$i->format('Y') <= (int)$end->format('Y') && (int)$i->format('M') <= (int)$end->format('M')) { ?>