diff --git a/Abfall_ICS/README.md b/Abfall_ICS/README.md index c274a66..3ea7358 100644 --- a/Abfall_ICS/README.md +++ b/Abfall_ICS/README.md @@ -132,6 +132,7 @@ v1.2.20250107 * _NEU_: Internationalisierte Anbieterauswahl * _NEU_: ICS Datei kann vom Filesystem geladen werden +* _FIX_: Events in ICS werden standardmäßig sortiert * _FIX_: Dokumentation verbessert v1.1.20240702 diff --git a/Abfall_ICS/module.php b/Abfall_ICS/module.php index 729b251..3a3b8e7 100644 --- a/Abfall_ICS/module.php +++ b/Abfall_ICS/module.php @@ -290,11 +290,11 @@ public function Update() return; } // get all events - $events = $ical->events(); + $events = $ical->sortEventsWithOrder($ical->events()); // go throw all events $this->SendDebug(__FUNCTION__, 'ICS Events: ' . $ical->eventCount); foreach ($events as $event) { - //$this->SendDebug(__FUNCTION__, 'Event: ' . $event->summary . ' = ' . $event->dtstart); + $this->SendDebug(__FUNCTION__, 'Event: ' . $event->summary . ' = ' . $event->dtstart); $dtstart = substr($event->dtstart, 0, 8); if ($dtstart < date('Ymd')) { continue;