Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
LADR Posted 8 hours ago Posted 8 hours ago (edited) Hello, We are experiencing issue about the "upcoming event" widget. We are seeing events but the disappear 1h before the start of the event. Here's some insights : - Events are configured in Paris timezone - Our computer are in Paris timezone - Our server is configured with CET time If you check screenshots, at the time of the event -1h, we are still seeing them, and one minute after (my screenshot is 3minutes later), we does not see it anymore. But we are at 19h46 and the event start at 20h45. Regards Edited 8 hours ago by LADR
Jim M Posted 8 hours ago Posted 8 hours ago Are events configured with the correct DST time zone? If so, can you pass the URL of an event we can look at?
LADR Posted 8 hours ago Author Posted 8 hours ago 4 minutes ago, Jim M said: Are events configured with the correct DST time zone? If so, can you pass the URL of an event we can look at? @Jim M here is an event : https://lesaventuriersdurhone.org/events/event/10-soirée-jeux-ii/ What do you mean by "DST" ? Event is in the correct timezone (our timezone) In the database too :
Jim M Posted 8 hours ago Posted 8 hours ago Sorry, DST is Daylight Savings Time. This would be an hour earlier or later depending on the time of year if your time zone accounts for it.
LADR Posted 7 hours ago Author Posted 7 hours ago Thanks @Jim M The event is configured in Europe/Paris timezone. There is settings for setting DST in the event
Jim M Posted 7 hours ago Posted 7 hours ago We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. We look forward to further assisting you.
LADR Posted 7 hours ago Author Posted 7 hours ago 12 minutes ago, Jim M said: We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. We look forward to further assisting you. I've updated the login/passwd for the AdminCP
LADR Posted 7 hours ago Author Posted 7 hours ago (edited) @Jim M I've deep dive into the code, and I think the issue is about storing or retrieving the event. Let's take an example. It is 22h32 Paris time When I create an event, the event is inserted in the database in UTC, so 1 hour before the realtime for me (so 21h32). On the upcoming event widget, we are trying to fetch event starting at the current browser time, so 22h32 (applications/calendar/widgets/upcomingEvents.php:122). And the retrieve function use this time (22h38) on the sql query (applications/calendar/sources/Event/Event.php:2173) : I've dump the $where and $nonRecurring variables : array(3) { [0]=> array(1) { [0]=> string(29) "( event_calendar_id IN(1,3) )" } [1]=> array(1) { [0]=> string(23) "event_recurring IS NULL" } [2]=> array(7) { [0]=> string(373) "( ( DATE( event_start_date ) >= ? AND event_all_day=1 ) OR ( event_start_date >= ? AND event_all_day=0 ) OR ( event_end_date IS NOT NULL AND DATE( event_start_date ) <= ? AND DATE( event_end_date ) >= ? AND event_all_day=1 ) OR ( event_end_date IS NOT NULL AND event_start_date <= ? AND event_end_date >= ? AND event_all_day=0 ) )" [1]=> string(10) "2025-01-14" [2]=> string(19) "2025-01-14 22:32:47" [3]=> string(10) "2025-01-14" [4]=> string(10) "2025-01-14" [5]=> string(19) "2025-01-15 22:32:47" [6]=> string(19) "2025-01-14 22:32:47" } } in conclusion : We need to retrieve the event based on the UTC time (or the actual time - timezone offset) OR we need to store event in database with the time of the event at the local time (so including the timezone) Edited 7 hours ago by LADR
Recommended Posts