Home › Forums › Calendar Products › Events Calendar PRO › Display timezone identifier
- This topic has 3 replies, 2 voices, and was last updated 12 years, 12 months ago by
Jonah.
-
AuthorPosts
-
April 26, 2013 at 3:11 pm #46976
lloydsilver
ParticipantHow 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.
April 29, 2013 at 6:23 am #47116Jonah
ParticipantHi 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
April 29, 2013 at 12:35 pm #47180lloydsilver
ParticipantI’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="">
April 29, 2013 at 1:52 pm #47188Jonah
ParticipantHi 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?
-
AuthorPosts
- The topic ‘Display timezone identifier’ is closed to new replies.
