pennlabs/penn-courses

ICS Calendar Export - `UNTIL` time incorrect

Opened this issue · 0 comments

The end date for classes (the UNTIL date in the RRULE) is incorrect. The line UNTIL=20231211T000000Z (00:00 Dec 11) should actually be UNTIL=20231212T000000Z (00:00 Dec 12), since December 11th is the last day of classes, meaning classes still meet on December 11th, so the end date should be the very beginning of Dec 12th.

In fact, it should actually technically be UNTIL=20231212T050000Z (Dec 12th, 5am UTC) since that is the UTC time equivalent to midnight between Dec 11th/Dec 12th in Philadelphia. Since if you just use UNTIL=20231212T000000Z, then courses that start after 7pm on Dec 11th would erroneously be marked as not meeting. (I believe the UNTIL property requires specifying the date in UTC, and not any other timezone).

Basically, the UNTIL value should be set to midnight following the last day of class, converted from Philadelphia (New York) time zone to UTC, with a Z specifier indicating that its in UTC.