twomice / com.joineryhq.activityical

CiviCRM extension: Provides an iCalendar feed of assigned activities per contact
Other
2 stars 14 forks source link

Version 1.8 - Timezone not in the feed #48

Open lshaw1968 opened 1 year ago

lshaw1968 commented 1 year ago

The TZID is not in the feed so, all appointments are not at the good time

twomice commented 1 year ago

@lshaw1968 Can you attach your feed as a file on this ticket?

lshaw1968 commented 1 year ago

Here the feed civicrm_activities (6).zip

twomice commented 1 year ago

Thanks @lshaw1968 .

In the feed, dates/times are given in UTC, adjusted for your timezone settings per Drupal or WordPress configuration.

For example, in the file "civicrm_activities (6).ical", the first entry has this start date/time (lines 12):

DTSTART;VALUE=DATE-TIME:20230414T100000Z

If I'm reading that Start time correctly, it's "April 14, 2023, 10:00:00 AM, UTC", which would be, "April 14, 2023, 06:00:00 AM" in Montreal (for example).

To further address your issue, i would ask:

  1. Is this feed entry (the one with "BEGIN:VEVENT" on line 5) a good example of the problem you're seeing? (Or if it's not, which entry is a good example of the problem?)
  2. For that entry:
    1. What is the actual date/time value for this activity in CiviCRM?
    2. What are you expecting to see?
    3. What are you actually seeing?
  3. What software are you using to consume the feed when you see this problem (Outlook? Google Calendar? Something else?)

Thanks!

lshaw1968 commented 1 year ago

Yes the description is accurate.

The actual time in civicrm is 10.00 am Montreal time Like in the image below

I was expecting to see the event at 10 am montreal time and I tried

  1. Outlook public feed
  2. Nextcloud import calendar

De : Allen Shaw @.> Envoyé : 11 avril 2023 08:57 À : twomice/com.joineryhq.activityical @.> Cc : lshaw1968 @.>; Mention @.> Objet : Re: [twomice/com.joineryhq.activityical] Version 1.8 - Timezone not in the feed (Issue #48)

Thanks @lshaw1968 https://github.com/lshaw1968 .

In the feed, dates/times are given in UTC, adjusted for your timezone settings per Drupal or WordPress configuration.

For example, in the file "civicrm_activities (6).ical", the first entry has this start date/time (lines 12):

DTSTART;VALUE=DATE-TIME:20230414T100000Z

If I'm reading that Start time correctly, it's "April 14, 2023, 10:00:00 AM, UTC", which would be, "April 14, 2023, 06:00:00 AM" in Montreal (for example).

To further address your issue, i would ask:

  1. Is this feed entry (the one with "BEGIN:VEVENT" on line 5) a good example of the problem you're seeing? (Or if it's not, which entry is a good example of the problem?)
  2. For that entry:
  3. What is the actual date/time value for this activity in CiviCRM?
  4. What are you expecting to see?
  5. What are you actually seeing?
  6. What software are you using to consume the feed when you see this problem (Outlook? Google Calendar? Something else?)

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/twomice/com.joineryhq.activityical/issues/48#issuecomment-1503289373 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7HGHGZKWGN2PSUGM7LLYLXAVIKNANCNFSM6AAAAAAWZM7EEY . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AK7HGHDCY7EQQZSCZ5UONDTXAVIKNA5CNFSM6AAAAAAWZM7EE2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZTJQB2.gif Message ID: @. @.> >

twomice commented 1 year ago

@lshaw1968 Looks like the image did not come through. But I imported the "civicrm_activities (6).ical" feed into Google Calendar and see this:

cal

Since my Google Calendar is set for US Central Time (America/Chicago), the activity in question is showing up at April 14, 5:00am, which is what I expect given what we've discussed already.

So I believe the real question is this:

Since the activity is set for "10:00" in CiviCRM, why is it showing as 10:00 UTC (06:00 Eastern) in the feed?

To that, I would ask:

  1. What CMS are you using? (e.g. Drupal, WordPress)
  2. What is your timezone setting in that CMS?

BTW, some notes about how this extension handles timezones per CMS:

lshaw1968 commented 1 year ago

I use Drupal ,

I just reviewed all users timezone 0plus the site’s default and set everyone to New-York.

Just deactivated the module and reactivate it plus flush cache and send ran cron etc… and here a new ical feed

--

Lawrence I. Shaw AVC FMA Pour prendre un rendez-vous ! Cliquez ici https://agenda.lacliniquefinanciere.com

Conseiller en sécurité financière Représentant de courtier pour le courtier en épargne collective

@. @.> | lacliniquefinanciere.com https://lacliniquefinanciere.com/ Tél.: 514-316-1401 Fax: 514-316-1475


La Clinique Financière. Cabinet de services financiers No d'inscription AMF : 503507 Propriété et opéré par Shaw et associés inc


Multicourtage Capital Inc. Courtier en épargne collective No d'inscription BDNI : 19430


ÉNONCÉ DE CONFIDENTIALITÉ Les renseignements contenus dans le présent courriel et toute pièce qui y est jointe peuvent être confidentiels et privilégiés en vertu de la loi, et ils sont destinés uniquement au(x) destinataire(s) prévu(s). Si vous n’êtes pas le destinataire prévu, veuillez (1) m’en informer immédiatement en répondant au présent message, (2) vous abstenir d’utiliser, de diffuser, de distribuer ou de reproduire une quelconque partie du message et, s’il y a lieu, les pièces jointes, et (3) détruire toutes les copies du présent message et, s’il y a lieu, les pièces jointes.

De : Allen Shaw @.> Envoyé : 11 avril 2023 10:08 À : twomice/com.joineryhq.activityical @.> Cc : lshaw1968 @.>; Mention @.> Objet : Re: [twomice/com.joineryhq.activityical] Version 1.8 - Timezone not in the feed (Issue #48)

@lshaw1968 https://github.com/lshaw1968 Looks like the image did not come through. But I imported the "civicrm_activities (6).ical" feed into Google Calendar and see this:

https://user-images.githubusercontent.com/759449/231184755-644cd473-3aaa-434f-9345-961b9e22ec8b.png

Since my Google Calendar is set for US Central Time (America/Chicago), the activity in question is showing up at April 14, 5:00am, which is what I expect given what we've discussed already.

So I believe the real question is this:

Since the activity is set for "10:00" in CiviCRM, why is it showing as 10:00 UTC (06:00 Eastern) in the feed?

To that, I would ask:

  1. What CMS are you using? (e.g. Drupal, WordPress)
  2. What is your timezone setting in that CMS?

BTW, some notes about how this extension handles timezones per CMS:

— Reply to this email directly, view it on GitHub https://github.com/twomice/com.joineryhq.activityical/issues/48#issuecomment-1503430077 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7HGHGF6TB2ZYFWVRHYLBTXAVQUXANCNFSM6AAAAAAWZM7EEY . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AK7HGHHLUSYW3WAC7YDSZ3LXAVQUXA5CNFSM6AAAAAAWZM7EE2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZTSC32.gif Message ID: @. @.> >

twomice commented 1 year ago

Hi @lshaw1968 The new feed is not attached to the ticket. But more importantly: what effect was made by setting site-wide and user timezone to New York?

lshaw1968 commented 1 year ago

really sorry about that, I simply replied by email and the file have been rejected. No effect on the feed :-(

civicrm_activities (8).zip

twomice commented 1 year ago

Drupal version?

lshaw1968 commented 1 year ago

Drupal 9

twomice commented 1 year ago

@lshaw1968 Please contact me offline about that since it's not directly related to this issue. See my contact information at https://github.com/twomice

twomice commented 1 year ago

As for Drupal 9: okay, I think we've found it. Probably this extension is not doing a good job of getting the timezone from Drupal 9. I'll need to do some testing to confirm, and then a fix.

lbl-knts commented 1 year ago

Can we contribute in any way to help solve the problem?

twomice commented 10 months ago

@lbl-knts If this is still on your radar, I'm certainly open to a PR to address this issue for Drupal 9/10. If that ship has sailed, I completely understand. Thanks!

lbl-knts commented 6 months ago

@twomice i have tested Matt5K's PR and it works for me. The code seems to add timezone support for drupal 8+ without conflicting other cms-timezones. Would you like to merge?