Support

Home Forums Event Espresso Premium Timezones

Timezones

Posted: January 23, 2018 at 6:33 pm


kdaily

January 23, 2018 at 6:33 pm

Is there a way to indicate on the event pages that the times for the class are EST, or to remove the times altogether? We have registrants across the country and it’s confusing with them not knowing what timezone the class times are for.


Josh

  • Support Staff

January 24, 2018 at 11:05 am

Hi there,

Yes, there’s a filter hook that can be used to indicate the timezone. In its simplest form, this will do the job:

add_filter(
    'FHEE__espresso_list_of_event_dates__datetime_html',
    'my_add_eastern_timezone_display',
    9,
    2
);
function my_add_eastern_timezone_display($html, $datetime){
    $html .= '<span>&nbsp;Eastern</span>';
    return $html;
}

If you want it to display EST if the event falls on Standard time, and EDT if the event falls on Daylight Savings time, then there’s a bit more code involved:

https://gist.github.com/joshfeck/c6d11834362749815829a6a30e91e61f

Whichever code you choose to implement, you can add the above to a functions plugin or into your WordPress theme’s functions.php file.

The support post ‘Timezones’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso