OzzyCzech / icalparser

Simple ical parser for PHP
https://ozana.cz
BSD 3-Clause "New" or "Revised" License
59 stars 22 forks source link

DateTimeZone::__construct(): Unknown or bad timezone #72

Open erkanpulat opened 1 year ago

erkanpulat commented 1 year ago

Issue: Invalid timezone error

Observations:

Two invalid timezone entries were encountered in our system:

  1. DateTimeZone::__construct(): Unknown or bad timezone (Argentina/Buenos_Aires)
  2. DateTimeZone::__construct(): Unknown or bad timezone (Indiana/Indianapolis)

Upon examining the IcalParser.php file, I noticed that the toTimezone function searches for a matching value within the windowsTimezones array. If it cannot find a match, it proceeds to use the $zone value directly. However, the subsequent operations involving new DateTimeZone($value) do not accept the value returned by this function. It seems that additional entries may need to be added to the windowsTimezones file.

Any help or guidance on resolving this issue would be greatly appreciated. Thank you in advance!