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

Include the timezone for date values in the Event iCal #19762

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

agileware-justin
Copy link
Contributor

@agileware-justin agileware-justin commented Mar 9, 2021

Overview

Include the timezone for date values in the Event iCal

Before

Timezone not specified for date values in the Event iCal

After

Timezone is specified for date values in the Event iCal

Technical Details

tpl was missing TZ attribute.

Comments

Odd no one picked this up earlier.

Agileware Ref: CIVICRM-1676

@civibot
Copy link

civibot bot commented Mar 9, 2021

(Standard links)

@civibot civibot bot added the master label Mar 9, 2021
@demeritcowboy
Copy link
Contributor

Timezone is near the top of the file. But it wouldn't surprise me if the way different calendars handle timezone varies, so 🤷 .

@agileware-justin
Copy link
Contributor Author

yes and 🤷‍♂️

@demeritcowboy
Copy link
Contributor

Ok well I can test this tomorrow against ones where it works now and see if it still works. By "tomorrow" I mean my tomorrow which for you is farther in the future. I don't think I'll ever get how that works. It doesn't make any sense.

@agileware-justin
Copy link
Contributor Author

agileware-justin commented Mar 9, 2021

@demeritcowboy if you said tomorrow TZ [insert your timezone here] then I'd know exactly what you meant. Which is sort of what this PR is about anyway, right? TZ GMT+11

@demeritcowboy
Copy link
Contributor

I reviewed this today, which for you would be yesterday, or maybe tomorrow. Looks good.

  • General standards
    • [r-explain] PASS
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] PASS
      • It improves timezone handling. Bizarrely outlook desktop gets it wrong either way, and won't import multiday events (which doesn't come up with activities). But the big one google and also outlook web check out. Even thunderbird.
  • Developer standards
    • [r-tech] PASS
      • Might be worth doing the activity one too. CRM/Activity/Calendar/ICal.tpl
    • [r-code] PASS
      • Aside: The existing if block logic in this file is weird.
    • [r-maint] ?
    • [r-test] PASS

@agileware-justin
Copy link
Contributor Author

Thanks @demeritcowboy, see #19770

@seamuslee001
Copy link
Contributor

Merging as per @demeritcowboy 's review

@seamuslee001 seamuslee001 merged commit dca6804 into civicrm:master Mar 9, 2021
@artfulrobot
Copy link
Contributor

For my own future benefit, if nobody else's: This made it into 5.37

@Stoob
Copy link
Contributor

Stoob commented Oct 4, 2021

Hi guys, I wanted to make you aware of a new twist on this issue since timezones were added to the Civi-generated ical/ics files. Good news and bad, but wanted to share my research. Good news: timezones are good, and as you know ical/ics file formats can vary but are governed by a nonprofit group that established standards in 2009 called RFC5545. Bad news: Glitches in Outlook.

The standards are meticulous but illustrate the format here: https://icalendar.org/iCalendar-RFC-5545/3-8-3-1-time-zone-identifier.html and the TZ zones can be clearly seen here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

How does this relate to Outlook, might you ask? Good question. Well I scoured the internet and people unrelated to CiviCRM have reported issues with timezone discrepancies in Outlook....

... what these tend to have in common is that the discrepancies happen during Daylight Savings, which we are in right now, and which ends Nov 7. And they all have to do with ical/ics files that use a format of "America/New_York" whereas Outlook uses a different naming convention.

But how does this relate to CiviCRM? An even better question. Prior to version CiviCRM 5.37 which was released in June, CiviCRM ical/ics files had NO timezone at all, here: #19762 I never knew this. Lack of timezone caused problems of its own, but with most folks who are in the same timezone it doesn't matter.

When I made a mandatory security update to 5.38 CiviCRM a few months ago, the problems surfaced for a large nonprofit organization that uses primarily Outlook. That is because although CiviCRM now creates its ical/ics file to the RFC5545 standard, Outlook does not (attached). And now that CiviCRM is putting in timezones, we notice the issue for the first time...but only in Outlook. In one of the above posts it clearly states that Outlook misinterprets America/New_York in Daylight Savings.

So all that to say this is where we stand, between a rock and a hard place, metaphorically but perhaps even literally getting Microsoft to change their software might be like moving a mountain. And CiviCRM, well-meaning though we may be, may not want to accommodate a change to Civi that doesn't meet standards. There might be an exception or compromise in this mess, but it will more likely be on the CiviCRM side.

My hunch is that on or after Nov 5 the timezone discrepancy may "work itself out". Until then we will probably want to stay the course and keep the ical/ics file links hidden on your website and event receipts.

comparison

@agileware-justin
Copy link
Contributor Author

@Stoob thanks for the detailed analysis, could you copy this into a Gitlab and link back to here. I agree that it would be good to figure out an Outlook compatible solution, if possible.

@Stoob
Copy link
Contributor

Stoob commented Oct 4, 2021

Good suggestion: https://lab.civicrm.org/dev/core/-/issues/2887

@agileware-justin
Copy link
Contributor Author

Thanks @Stoob

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

Successfully merging this pull request may close these issues.

5 participants