From 91a653392c0e66f1941036e2b17d8fa6b162cde0 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sat, 12 May 2018 02:00:51 +0200 Subject: migrate logic for calculating schedule display time into schedule class --- model/Schedule.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'model/Schedule.php') diff --git a/model/Schedule.php b/model/Schedule.php index ec4ddc7..4b5d25e 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -44,6 +44,15 @@ class Schedule return $this->getConference()->getRoomIfExists( @$mapping[$scheduleRoom] ); } + public function getScheduleDisplayTime($basetime = null) + { + if(is_null($basetime)) { + $basetime = time(); + } + + return $basetime + $this->getSimulationOffset(); + } + private function fetchSchedule() { $schedule = @file_get_contents($this->getScheduleCache()); -- cgit v1.2.3