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

Timezone issues since 2022 #367

Open
JorisDebonnet opened this issue Jan 3, 2022 · 2 comments
Open

Timezone issues since 2022 #367

JorisDebonnet opened this issue Jan 3, 2022 · 2 comments

Comments

@JorisDebonnet
Copy link

I have the impression that createFromPhpDateTimeZone is no longer working correctly since 2022 for MS Outlook. I have not yet been able to figure out why. (At least to me it looks like it started on 1 January 2022.) It still works fine for e.g. Gmail, but in Outlook, it shows all times in the DST time, instead of the ones in January in 'standard' time.

Here's an example output inside the VCALENDAR that this package creates:

BEGIN:VTIMEZONE
TZID:Europe/Brussels
BEGIN:DAYLIGHT
DTSTART:20190101T000000
TZNAME:CEST
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
END:DAYLIGHT
END:VTIMEZONE

I do wonder, is that correct? It does not specify when daylight savings starts or ends. Maybe Gmail shows the time correctly because it's actually ignoring this VTIMEZONE. But Outlook interprets it like this:

BEGIN:VTIMEZONE
TZID:Europe/Brussels
BEGIN:STANDARD
DTSTART:16010101T000000
TZOFFSETFROM:+0200
TZOFFSETTO:+0200
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
TZOFFSETFROM:+0200
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE

That's what it shows when I forward the event invitation from Outlook to another address, where I then check the contents of the .ics file.

For now, I'll just create the events in UTC again... (but users don't like that because it looks less personal)

@JorisDebonnet
Copy link
Author

I am using php 8.1, in case that matters.

@johnbburg
Copy link

johnbburg commented Apr 25, 2022

I just started running into the inverse of this, where we are now in Daylight savings, and events are appearing as if they are in standard time.

I am not using any VTIMEZONE entries, and have been relying on the just the timezones within the dates themselves. I know this isn't quite spec, but it has seemed to work fine for years until this past changeover, and people started noticing that events imported via the Outlook desktop client were appearing an hour after they should have been. They show the correct time in just about every other calendar application.

I'm still using the 0.11.x branch of the library.

I am the maintainer of the Views iCal module for Drupal, and I have an issue I've been tracking this here https://www.drupal.org/project/views_ical/issues/3092917.

Configuring dates to be rendered in UTC appears to resolve the issue.

Update: It's the beginning of June now (comment originally posted on April 25th), and I'm back to looking into this issue. My problem is that for the example code in https://github.com/mattie02/iCal/blob/master/examples/example5.php works fine for any custom implementations, but I'm at a loss on how to dynamically handle Daylight saving timezones for any settings used by a particular installation of the module. I can hard-code the settings for one, but it won't work for other timezones, and I'm not sure how to 1, lookup whether any given timezone has a daylight savings component, and 2, figure out how to populate the vTimezone rules for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants