startDateTime = new DateTime($this->start_time); $this->startDateTime->setTimezone(new DateTimeZone(date_default_timezone_get())); $this->formattedStartTime = $this->startDateTime->format(get_lang('Y-m-d H:i')); $now = new DateTime(); $later = new DateTime(); $later->add(new DateInterval('PT'.$this->duration.'M')); $this->durationInterval = $later->diff($now); $this->formattedDuration = $this->durationInterval->format(get_lang('DurationFormat')); } /** * {@inheritdoc} */ public function itemClass($propertyName) { if ('recording_files' === $propertyName) { return File::class; } return parent::itemClass($propertyName); } }