Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
LADR Posted Tuesday at 08:23 PM Posted Tuesday at 08:23 PM (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 Tuesday at 08:24 PM by LADR
Jim M Posted Tuesday at 08:35 PM Posted Tuesday at 08:35 PM 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 Tuesday at 08:41 PM Author Posted Tuesday at 08:41 PM 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 Tuesday at 08:49 PM Posted Tuesday at 08:49 PM 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 Tuesday at 08:53 PM Author Posted Tuesday at 08:53 PM Thanks @Jim M The event is configured in Europe/Paris timezone. There is settings for setting DST in the event
Jim M Posted Tuesday at 08:56 PM Posted Tuesday at 08:56 PM 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 Tuesday at 09:09 PM Author Posted Tuesday at 09:09 PM 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 Tuesday at 09:41 PM Author Posted Tuesday at 09:41 PM (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 Tuesday at 09:43 PM by LADR
Marc Posted Wednesday at 09:07 AM Posted Wednesday at 09:07 AM Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
Recommended Posts