Has anyone got any experience working with iCal feeds - I have written a plugin utilising the CalFileParser library but the UK clock changes have thrown all the items out, so eg an all day event is now showing up as at 11pm the day before. For example:
SUMMARY:F4 Careers Day
Is importing as 23:00 on 18/04/2017. However importing the feed into Calendar (Mac) is reporting the event as expected at 00:00 on 19/04/2017.
If I update my site settings to BST (UTC+1) and parse the value into a DateTime object then it outputs to screen correctly, eg:
$tmp = DateTime::createFromString($item['dtstart']->date);
Craft\DateTime Object ( [date] => 2017-04-19 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/London )
However, on saving to my database record (to a column with AttributeType::DateTime) this date value is saved as
2017-04-18 23:00:00. This means that any attempt to retrieve and show this on my site outputs the wrong date/time.
Any thoughts on how to get my script to acknowledge the time difference and save this to the relevant record without having to tinker with the code every 6 months?