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

[Issue 402] TZ fix for ICS dates #403

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

gkovats
Copy link
Collaborator

@gkovats gkovats commented Aug 11, 2024

This is for issue #402

Problem I believe is the DTSTART format in the ICS file is getting Timezone, but then getting a date stamp relative to the current user's timezone, which gets mixed up:

    `DTSTART;TZID=${meeting.timezone}:${meeting.start.toFormat(fmt)}`,

First part is the timezone prefix, so the calendar app knows the context, and the second part is the timestamp formatted, which is picking up the user's local browser relative time. The two don't mix. So, just enforced that when we pass a timestamp here, the time is relative to that given timezone. Tested against the issue's Dharma meetings, they're importing correctly.

Copy link

netlify bot commented Aug 11, 2024

Deploy Preview for tsml-ui ready!

Name Link
🔨 Latest commit 6d12ef7
🔍 Latest deploy log https://app.netlify.com/sites/tsml-ui/deploys/66b93a9eb319a50008e95002
😎 Deploy Preview https://deploy-preview-403--tsml-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gkovats gkovats changed the title TZ fix for ICS dates [Issue 402] TZ fix for ICS dates Aug 11, 2024
@joshreisner
Copy link
Contributor

thanks @gkovats !! seeking to understand this issue a little better. do you get the wrong tz when you add this meeting ics? https://aasanjose.org/meetings?search=one+big+tent&meeting=one-big-tent

im on eastern right now and see 9pm, which is correct. wondering why it would work here and not on the dharma meeting.

ill research more when i get in front of a computer

@joshreisner
Copy link
Contributor

i see what the issue is. this only affects sites with a timezone-agnostic meeting finder

https://github.com/code4recovery/tsml-ui/blob/main/src/helpers/load-meeting-data.ts#L256-L260

if there is no global timezone set, it sets start and end to your local timezone. would not affect san jose because it's America/Los_Angeles

@joshreisner joshreisner merged commit 1ed3896 into main Aug 12, 2024
6 checks passed
@joshreisner joshreisner deleted the issue-402-ICS-tz-timedate branch August 12, 2024 13:34
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

Successfully merging this pull request may close these issues.

2 participants