How to change the default start & end of day times for the events+ plugin.

Our website is focused around nightlife (bars, restaurants, etc.) and because of that, we'd prefer every business day end at 'closing time' for the town (when they can no longer serve alcohol), which is 1am.

Is there a way to change the settings in the Events+ plugin to have the next day start at 1:01am, instead of 12:00am?

Thank you!

  • controlyours

    Yes Hakan that's correct!

    We'd be fine with our entire wordpress install to switch days at 1am instead of 12am.
    Know any good work arounds? We mainly want it for the calendar, but it would be cool for the other stuff as well.

    By the way, I filled out this support ticket from the new dashboard interface but did not get notified that you replied...just a note. :slight_smile:

    Any help would be appreciated.

  • Hakan

    Hi controlyours,

    This is the only solution I can see:

    1. Set the event's end time as 00:00. In the example event starts at 2012-06-29 23:00 and ends 2012-06-30 00:00

    2. Add one hour to end time of each event while displaying it. To do so, include this in the functions.php of your theme:

    add_filter( 'eab-events-event_date_string', 'my_special_function', 10, 4 );
    function my_special_function($content, $event_id, $start, $end ) {
    
    	$end_date_str = (date('Y-m-d', $start) != date('Y-m-d', $end))
    				? date_i18n(get_option('date_format'), $end) : '';
    
    	return sprintf(
    				__('On %s <span class=&quot;wpmudevevents-date_format-start&quot;>from %s</span> <span class=&quot;wpmudevevents-date_format-end&quot;>to %s</span><br />', 'eab'),
    				'<span class=&quot;wpmudevevents-date_format-start_date&quot;>' . date_i18n(get_option('date_format'), $start) . '</span>',
    				'<span class=&quot;wpmudevevents-date_format-start_time&quot;>' . date_i18n(get_option('time_format'), $start) . '</span>',
    				'<span class=&quot;wpmudevevents-date_format-end_date&quot;>' . $end_date_str . '</span> <span class=&quot;wpmudevevents-date_format-end_time&quot;>' . date_i18n(get_option('time_format'), $end+3600) . '</span>'
    			);
    }

    Now, as you can see from the attached screenshots, event is displayed as ending at 2012-06-30 01:00, but it is only shown for 29 June in the calendar.

    I hope this helps,

    Cheers,
    Hakan

  • aecnu

    Greetings controlyours,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU Dev member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.