Adding Time Zone to events

Home Forums Calendar Products Events Calendar PRO Adding Time Zone to events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #79617
    pdelite
    Participant

    I’ve seen several threads on adding a time zone to events, but none of the threads mentioned exactly what files need to be edited and what part of the file to edit. Please let me know, as we want the time zone referenced in the list view and main event pages. We would like the time zone to display “Central Time”. I’ve tried updating WordPress time, but it shows up as UTC.

    #80020
    Barry
    Member

    If you want to display something other than the timezone identifier (signified by the e character, as provided by the PHP date() function for instance) then I’m afraid you’ll need to figure out the details for that by yourself.

    Perhaps you could filter the output of any date/time strings and do a string replace operation?

    #80024
    pdelite
    Participant

    I just want it to display “Central time”. Can’t that simply be done with an echo statement?

    #80147
    Barry
    Member

    Well if you want “Central Time” to be added to the end of the schedule details you could certainly do something like this (you would add this code to your theme’s functions.php file):

    add_filter( 'tribe_events_event_schedule_details', 'append_text_to_schedule_details' );

    function append_text_to_schedule_details( $text ) {
    return "$text Central Time";
    }

    If you are actually dealing with events in multiple time zones though or need more finely grained control then you’d need to think up a different approach (like I outlined above). Remember to check out our Themer’s Guide!

    Hope that helps 🙂

    #982740
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adding Time Zone to events’ is closed to new replies.