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

Problem with iCal calendar that shows times wrong #208

Closed
machfr opened this issue Mar 12, 2019 · 3 comments
Closed

Problem with iCal calendar that shows times wrong #208

machfr opened this issue Mar 12, 2019 · 3 comments
Labels

Comments

@machfr
Copy link

machfr commented Mar 12, 2019

I am having an issue where I have this Ical (Icloud): https://p59-calendars.icloud.com/published/2/NTU4MDkwODI4NTU4MDkwOFQqNMVtnNFS5S6Msuf6RmTzb4vQHQEI-ztPF8YDoroopzBpaSwui-TIyZju7LexUnrUXMiTuteNl2iNgttSYQ8

and on the 12th (today) I have en even running from 09:30 - 10:15 but when it comes out through the parser the dtstart_tz is set to 10:30 and dtend_tz to 11:15 which is 1 hour wrong.

I have tried to do the same with other calendars created in google, outlook and other places and they all get dtstart_tz and dtend_tz set correctly

the config is set as the follow:

$ical = new ICal($calendar_url, array(
    'defaultSpan'                 => 2,
    'defaultWeekStart'            => 'MO',
    'disableCharacterReplacement' => false,
    'filterDaysAfter'             => null,
    'filterDaysBefore'            => 1,
    'replaceWindowsTimeZoneIds'   => false,
    'useTimeZoneWithRRules'       => true,
));

someone able to maybe give me a hint on what is going wrong?

@u01jmg3 u01jmg3 self-assigned this Mar 12, 2019
@u01jmg3 u01jmg3 changed the title Problem with ical calendar that shows times wrong Problem with iCal calendar that shows times wrong Mar 12, 2019
@machfr
Copy link
Author

machfr commented Mar 12, 2019

Screenshot 2019-03-12 at 12 58 56

Could maybe add that this shows that dtstart_array has the correct time where dtstart_tz dosen't, just to show you what the output from the parser gives as it might make it easier to give feedback on it.

@u01jmg3
Copy link
Owner

u01jmg3 commented Mar 12, 2019

Will try and find time this weekend to take a look but please proceed with your own investigation meantime. I don't get a lot of time to work on issues these days.

@machfr
Copy link
Author

machfr commented Mar 12, 2019

Ok, so I have found out that it goes wrong when you do this around line 1048:

$dateTime = new \DateTime($dateArray[1], new \DateTimeZone(self::TIME_ZONE_UTC));
$dateTime->setTimezone(new \DateTimeZone($this->calendarTimeZone()));

Where you take the time that stands as 9:30 and say it is UTC aka. UK time then after you set the timezone to Europe/Copenhagen which makes the time go one hour head compared to what it should be.

@u01jmg3 u01jmg3 closed this as completed Jul 17, 2019
@u01jmg3 u01jmg3 removed their assignment Jul 17, 2019
@u01jmg3 u01jmg3 added this to the v2.x.x milestone Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants