Display timezone identifier

Home Forums Calendar Products Events Calendar PRO Display timezone identifier

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46976
    lloydsilver
    Participant

    How can I always display the timezone of an event (always Pacific Time for me) whenever a time is displayed – so in the widget, event list, event page, etc.

    #47116
    Jonah
    Participant

    Hi lloydsilver,

    You just need to add the PHP date timezone identifier (http://php.net/manual/en/function.date.php) to wherever time is displayed in the plugin. Then, I suggest taking a look at our themer’s guide to get some ideas as to how to modify template files: https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/ We’ve also got other examples scattered throughout our documentation and tutorials.

    I hope that helps!

    – Jonah

    #47180
    lloydsilver
    Participant

    I’m trying to add the timezone to the list view. So where would I add the php to display the timezone in list.php?

    <a class='tribe-events-button-on' href=''>
    <a class='tribe-events-button-off' href=''>

    <div id="post-" itemscope itemtype="http://schema.org/Event">

    <a href="">

    <div class="list-content with-thumb">

    <?php the_title('', ''); ?>

    <td class="tribe-events-event-meta-value" itemprop="startDate" content="">

    <td class="tribe-events-event-meta-value" itemprop="endDate" content="">

    <td class="tribe-events-event-meta-value" itemprop="startDate" content="">

    <a class="gmap" itemprop="maps" href="" title="Click to view a Google Map" target="_blank">


    get_event_taxonomy() ) ) {
    $cat = get_term_by( 'slug', get_query_var('term'), $tribe_ecp->get_event_taxonomy() );
    if( tribe_is_upcoming() ) {
    $is_cat_message = sprintf(__(' listed under %s. Check out past events for this category or view the full calendar.','tribe-events-calendar'),$cat->name);
    } else if( tribe_is_past() ) {
    $is_cat_message = sprintf(__(' listed under %s. Check out upcoming events for this category or view the full calendar.','tribe-events-calendar'),$cat->name);
    }
    }
    ?>

    <?php printf( __('No events scheduled for %s. Please try another day.', 'tribe-events-calendar'), date_i18n('F d, Y', strtotime(get_query_var('eventDate')))); ?>

    <?php previous_posts_link( ''.__('« Previous Events', 'tribe-events-calendar').'' ); ?>

    <a href=''>

    <?php next_posts_link( ''.__('« Previous Events', 'tribe-events-calendar').'' ); ?>

    <?php next_posts_link( ''.__('Next Events »', 'tribe-events-calendar').'' ); ?>

    <?php previous_posts_link( ''.__('Next Events »', 'tribe-events-calendar').'' ); // a little confusing but in 'past view' to see newer events you want the previous page ?>

    <a href=''>

    <a title="" class="ical" href="">

    #47188
    Jonah
    Participant

    Hi lloydsilver,

    In list.php anywhere where tribe_get_start_date or tribe_get_end_date are used you can pass in PHP date identifiers to display like so:

    tribe_get_start_date(null, false, 'F j, Y - g:ia T');

    That would display the entire start date like: “April 27, 2013 – 2:51pm MST”

    Does that help?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Display timezone identifier’ is closed to new replies.