Server time, scheduled events, server time changes (summer / winter)

I finally figured out why the scheduled events are happening on a different time than expected. Let’s say I have a new scheduled daily event. The start date is somewhere in February and this event starts every day at 2000 hours server time. But now summertime kicks in. No longer is this scheduled event at 2000 hours but it goes at 2100 hours. The reason for this is that Mendix calculates the time at the starting date reschedules this event every 24 hours. So when summertime kicks in and the server time is changed it does not take that into account. More strange does it become when I now schedule an event in june that goes daily at 2030 hours server time. Because the starting date is in the summertime period, this event will start at 2030 hours. You can imagine what happens when the server goes in wintertime again. I seriously think that Mendix has to rethink the way that scheduled events are happening. Server time is server time, so when the server time changes the scheduled events should also change.
3 answers

I do agree with Ronald that there are cases when you want the scheduled event to run on the time you specify thus including a DST correction. Mostly because several systems are doing stuff in a certain order the are not synchronized and the event is estimated to be finished in a certain time. See this as a poor man's sync.

However if you do so you should not schedule such an event between 02:00 and 03:00. 02:00 itself cannot be used, 01:59 can. 03:00 cannot be used, 03:01 can.

So a checkbox (boolean) on scheduled events to fix for DST and a modeler GUI check to disallow the 02:00-03:00 time range could solve the issue.


I think Jan Doggen exactly points out the problem when including DST, its way more complex to handle the cases when the shift takes place right (because in that case certain timestamps exist twice, and others not at all) then it is to detect whether you are in summer or winter time and just shift the event (or, if applicable, just substract one hour from all timestamps used in the MF).

You could for example create two events, on firing at 20.00 and one firing at 19.00. Those two should just check whether they are fired in the applicable DST and continue or break and the issue is solved.

Last but not least, scheduled events are defined as starting point + interval. The meaning of Day is 24 hours (ok, and a few seconds strictly speaking ;-)), and not 'but sometimes 25 hours'.


Ticket 8688 is created for this feature request.