Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public school calendar throwing exception for what looks like a time zone issue #305

Closed
sujal opened this issue Feb 20, 2024 · 1 comment

Comments

@sujal
Copy link
Contributor

sujal commented Feb 20, 2024

This ical URL is failing with node-ical v0.17.1: https://www.washougal.k12.wa.us/hathaway/calendars/category/school-events/?post_type=tribe_events&ical=1&eventDisplay=list

TypeError: (name || "").toLowerCase is not a function
    at normalizeName (/usr/app/node_modules/moment-timezone/moment-timezone.js:404:23)
    at Function.getZone [as zone] (/usr/app/node_modules/moment-timezone/moment-timezone.js:426:10)
    at Object.DTSTAMP (/usr/app/node_modules/node-ical/ical.js:301:42)
    at Object.handleObject (/usr/app/node_modules/node-ical/ical.js:665:39)
    at Object.parseLines (/usr/app/node_modules/node-ical/ical.js:717:18)
    at Object.parseICS (/usr/app/node_modules/node-ical/ical.js:750:12)
    at /usr/app/node_modules/node-ical/node-ical.js:112:14
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

There's only 1 VTIMEZONE block in the file, see below:

BEGIN:VTIMEZONE
TZID:Africa/Abidjan
BEGIN:STANDARD
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
TZNAME:GMT
DTSTART:20240101T000000
END:STANDARD
TZID:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:20240310T100000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:20241103T090000
END:STANDARD
END:VTIMEZONE

icalendar.org's validator says this is a valid ical feed: https://icalendar.org/validator.html?url=https://www.washougal.k12.wa.us/hathaway/calendars/category/school-events/?post_type=tribe_events&ical=1&eventDisplay=list

I'm going to setup to debug the library soon, will update the ticket soon. If there are specific things you need me to share re: configs/etc, please let me know.

@sujal
Copy link
Contributor Author

sujal commented Feb 23, 2024

I've submitted a patch/workaround in PR#307 #307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants