Closed arwinvdv closed 2 years ago
@s0600204: I understand if you're busy but your input would be welcome on this issue
The primary issue here can be summed up as a quote from the project's readme:
Requirements
- PHP 5 (≥ 5.6)
- Valid ICS (.ics, .ical, .ifb) file
- IANA, Unicode CLDR or Windows Time Zones
The timezone named Customized Time Zone
fails the third requirement.
In order to support user-defined timezones, we'd need a way to specify a timezone in a way that PHP's DateTime
class can understand/use it. In other words: we'd need to take what's defined in a VTIMEZONE
block and convert it into a DateTimeZone
class instance.
Unfortunately, DateTimeZone
itself lacks full support for user-defined timezones (with daylight savings transitions et al.) - the best it can do is a single offset-from-UTC.
Thus to support a Standard/Daylight transition we'd need to create two DateTimeZone
instances - one for "Standard" and one for "Daylight [Savings]". We'd also need a way to detect which of these two are in effect for any given date-time; apply them consistently with regards to event recurrences; and only do this if the timezone is a user-defined one.
@arwinvdv: in light of the info @s0600204 has kindly provided, at this point in time, I won't be exploring user-defined timezones unless more users are interested in such a feature. However, if you want to put a PR together, I'd be happy to take a look.
7.2.21
2.1.15
Description of the Issue:
I have a ical from Microsoft and Google with 2 VTIMEZONE's defined. The parser only uses 1 timezone.
Steps to Reproduce: