I’m trying to modify the plugin to allow for varying start/finish times for weekly reoccurring events.
I’m looking at _eventorganiser_generate_occurrences
and figuring out where to modify the event times for the different occurrences. I see that in the loop to set up the schedule, the event’s start day is used, as well as it being used in the loop to generate the actual occurrences. However, I don’t see the finishing time being used anywhere, except when being validated earlier on in the function.
Is it brought up elsewhere that I should be aware of? I want to be able to set custom start and end times to events, but occurrences seem to only use the starting time… Is there somewhere I should be looking, that you know of? Where would you recommend setting the ending time for occurrences?
Thanks!

Alex Reynolds
Hi Alex,
If you look at _eventorganiser_insert_occurrences()
you’ll see that the duration of the first occurrence is calculated and used to generate the finish times of the event. So the duration of each occurrence is fixed, according to the first.
This may well change: as I mentioned in this thread there is currently a development branch (edittime
) for altering start date/times on the admin calendar. I’ll be pushing the changes to GitHub in the next few days. Initially the duration of each occurrence will still be fixed, but the admin calendar does allow (although its currently disabled) for events to be resized (i.e. duration changes).
But there are a few canges that would need to happen, above and beyond what changes have been made in the edittime
branch
- The
include
argument would need some way of accepting and recognising periods (i.e. include occurrence with given start and end time) rather than just a date.
_eventorganiser_generate_occurrences
would need to generate 2D array of start and end datetimes
_eventorganiser_insert_occurrences
would need to use that to insert/update event dates.
I’ll post an update on the thread I’ve linked to once the edittime
branch is up on GitHub.

Stephen Harris
Here’s a link to the development branch for allowing individual occurrences to have differing start times. Durations are still fixed at this point: https://github.com/stephenharris/Event-Organiser/tree/edittime

Stephen Harris