Posted: July 20, 2022 at 3:16 pm
Hello, @Tony, would you be so kind as to elaborate on your response here?
Again, if you’d be so kind as to quickly elaborate how the custom field/gist works, that’d be most appreciated. Or if possible, provide an example. Much obliged. Cheers. |
|
Hi there, Just to note, the code in that gist is intended as an example of how you can hook into the iCal data rather than being a full solution for this. That code is checking for a value of ‘Pacific’ within a custom field with the name ‘event_timezone’, so as it stands if your using that it will only do ‘something’ when the custom field value matches the code. Right now if the
That’s replacing the current DTSTART value with a new date, using the iCAL datetime format and passing Here is a modified version which sets the timezone you provide onto the datetime itself, then uses the datetime to regenerate the dates again: https://gist.github.com/Pebblo/e031f4768cf863368a0099bc097fd04b Note that you need to make sure that the value you set for event_timezone (if setting one on the event) is a valid timezone for this to work correctly. |
|
Thanks for this. I truly appreciate it. That said, I couldn’t get it to work. After fixing for the valid timezone formatting (thanks for the tip), it seems no matter what I do, the time in the ics file doesn’t seem to change. ACF field: https://snipboard.io/Xh5Dvw.jpg I must be missing something. Maybe I’ll just hire someone who knows what they’re doing. Otherwise… feature request? Thanks again. |
|
Yeah, my apologies! That would be because I’m using a method you can’t use for the above.
I’ve updated my gist to use one of our helper methods to apply the timezone on the fly, that should work correctly now. |
|
This worked, mostly. Thanks! I needed a small workaround though: It seems to grab the time as UTC despite my Phoenix timezone settings: https://snipboard.io/ViMIdH.jpg So I tricked the ACF field to calculate the offset: https://snipboard.io/JOWVb3.jpg One problem: Can’t do Los Angeles as there aren’t any cities located in UTC -1:00! Anyhow, any further wisdom is appreciated. And thank you for your help here. Cheers. |
|
Hi there, Thanks for getting back to us. Since Tony is more familiar with your case, I am reaching him to check your last response. |
|
Thank you Joao. Turns out I actually need some support here. I thought I had it working but I don’t… Appreciate your/Tony’s help. Much obliged. |
|
Huh? Can’t you just pass a timezone of
Can you add more details about what isn’t working? The snippet is working for me so I’m not sure what is happening on your site? |
|
Tony, Here in the States I’m attempting to cover events in 4 timezones: Pacific/Mountain/Central/Eastern. Without understanding what’s broken, after trial+error, I’ve reached a solution:
(Phoenix is currently in Pacific time, so Atlantic/Reykjavik (UTC/GMT) = me.) This is interesting for a few reasons:
I’ve tried it on a brand new bare local instance (only three plugins: EE, Snippets, and ACF) and a big live instance (many plugins) with equal positive results. Feel free to close the ticket as this time I’ve got it working. |
|
Hi there, Thanks for sharing more details with us and we’re glad to hear you got it working! |
|
The support post ‘Event Calendar Invite Timezone Issues’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.