CALSCALE being inserted at the wrong place in generated ICalendar files
We had a bug report at Fastmail from a customer trying to add the following file to their calendar, which was generated by CiviCRM:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:America/Los_Angeles
METHOD:PUBLISH
BEGIN:VEVENT
UID:CiviCRM_EventID_255_c2ebced490c608cd2aa7a6ae86cb8f9a@supporters.eff.org
SUMMARY:At Home With EFF: COVID-19\, Free Speech\, and Pri
vacy
DESCRIPTION:omitted here...
CATEGORIES:Workshop
CALSCALE:GREGORIAN
DTSTAMP;VALUE=DATE-TIME:20200422T120000
DTSTART;VALUE=DATE-TIME:20200422T120000
DTEND;VALUE=DATE-TIME:20200422T131500
URL:https://supporters.eff.org/civicrm/event/info?reset=1&id=255
END:VEVENT
END:VCALENDAR
Per the spec, CALSCALE should be in the outer VCALENDAR object, not inside the contained VEVENT object.
See: https://tools.ietf.org/html/rfc5545 section 3.7.
Having said that, CALSCALE:GREGORIAN
is already the default, so just omitting it would be fine.