Event Calendar Widget : Timezone issues

Greetings

Our elgg site is used exclusively by people in the same timezone. We find that the "Calendar Events" widget icon for each event shows the wrong date if the event is within the next day, because our timezone is 12 hours from UTC. This is causing real confusion in our team as to what day the event is happening. I would love to be able to hide the icon on the widget and just show the date and time; or to handle events just with the same consistent timezone that we are all in.

Can anyone advise on this one, please? Really struggling...

Also, we're keen to use the events list widget - but for some reason it is displaying the events in the order that they are created, rather than the order that they are due to happen - and I simply can't seem to find out why this is happening; having researched it.

Please; any help with this would be very very gratefully received...

With sincere thanks

Jamie

  • Which day of the week to be used as first day of week is implemented as (user/site) language dependent. If you always want Sunday or Monday regardless of the language used by a user, you would need to make two adjustments.

    In model.php I would suggest to alter the return value of the function event_calendar_get_first_day_of_week() to return always either 0 (for Sunday) or 1 (for Monday). If you are not using the full calendar view, this change should be enough already.

    For the first day of week in the full calendar you would need to modify mod/event_calendar/views/default/js/event_calendar/event_calendar_fullcalendar.js. In the init() function there the option firstDay: locale.firstDay currently used. You could change this to either 0 for Sunday or 1 for Monday regardless of language used and it should work.

    Widgets without user icon: I guess with a change in mod/event_calendar/views/default/object/event_calendar.php you might be able to achieve this. Try setting $icon to an empty string additionally in the if-clause that checks for widget context

    if (elgg_in_context('widgets')) {
            $metadata = '';
            $icon = '';
        } else {

    Not sure though what the output will look like then. But I guess the icon column should be at least much smaller.

  • Thank you again! Both those suggestions worked like a charm - and the output without the user icon looks just how I hoped. I very much appreciate the time that you put in to make this all so easy for us.

    My respect to you.