Hi Robert,
The fullCalendar calendar is cached – so in order to have it render different times based on the user, you’ll want to disable that:
add_filter( 'pre_transient_eo_full_calendar_public', '__return_null' );
add_filter( 'pre_transient_eo_full_calendar_public_priv', '__return_null' );
(actually you do no not need the first one, as that is only triggered when the user is not logged-in, in which case, you will not be making any modifications).
As for the modifications you can use the hook eventorganiser_fullcalendar_event
(see codex: http://codex.wp-event-organiser.com/hook-eventorganiser_fullcalendar_event.html). Warning: this filters each event (an array), allowing you to modify its properties, including ‘start’ and ‘end’. In 3.0.0 (due in just over a week), the JavaScript library used for the calendar was updated, and the data it expected differed.
Specifically, there was a change in how all-day events were specified. In particular, pre-3.0.0:
//$event refers to an event all-day on the 21st January
echo $event['start']; //prints 2016-01-21T00:00
echo $event['end']; //prints 2016-01-22T00:00
in 3.0.0, this is now
//notice the end date/time.
echo $event['start']; //prints 2016-01-21T00:00
echo $event['end']; //prints 2016-01-21T23:59
Note, also that Event Organiser a stores end dates according the original standard. That is, its only in the context of the calendar shortcode that this data is adjusted.
In that hook are you also given the event ID and occurrence ID, so you can get a DateTime object of the event’s start/end dates (see eo_get_the_start
etc). And then change the timezone, and replace $event['start']
and $event['end']
with the date formatted as above, but in the user’s timezone.
I shall have to get back to you regarding FES, but hopefully that’ll help you get started with the rendering of events in different timezones.