Display Timezone For Event

Home Forums Calendar Products Events Calendar PRO Display Timezone For Event

  • This topic has 7 replies, 2 voices, and was last updated 6 years ago by Claire Lanyado.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1508667
    Claire Lanyado
    Participant

    Hi there,

    I’m trying to get event specific selected timezones to display in the Event Details box on the single event pages but no matter what I do I cannot get them to show. I have “Berlin” set as the zone in the general WordPress settings, and I have the following set for my Tribe timezone options: https://cl.ly/qv2k, and this event (http://unifiedthomas.wpengine.com/event/teaching-trip-china/) has “Africa/Abijdjan” selected as it’s timezone but no timezone displays. Here is another event where the timezone should display: http://unifiedthomas.wpengine.com/event/download-meditation/2018-04-17/

    Any ideas why timezones are not displaying? I’ve looked all around and tried some things with PHP to display the zone, but nothing is working and I don’t see an obvious template function from you guys to display the zone.

    Please help. Thanks!

    #1510103
    juanfra
    Keymaster

    Hi Claire,

    Thank you for reaching out!  I hope you’re doing well.

    Have you done any template customization in your theme? Is there any special place you’d like the timezone to show on?

    Best,

    Juan.

    #1510140
    Claire Lanyado
    Participant

    Hi Juan,

    We have done template customization, but checking the customization against the core plugin files, I’m not seeing significant difference as it relates to the timezone or date/time display. Particularly with single events.

    We’re wanting to display the timezone in the sidebar Event Details section as you can see in the single events here: http://unifiedthomas.wpengine.com/event/teaching-trip-china/ or here: http://unifiedthomas.wpengine.com/event/download-meditation/2018-04-17/

    Let me know if you need any other information.

    Thanks,
    Claire

    #1510427
    juanfra
    Keymaster

    Hi Claire,

    Perfect, thank you for the follow-up.

    The date formatting can be configured in Events > Settings > Display > Date Format Settings. Those fields accept the date format options available to the PHP date() function. You can learn how to make your own date format following this link. Basically, there are characters which represent the different “date” options to display. The character “T” will be the one used for timezone. So, basically, you can add a T to the fields I mentioned before and it will add the timezone.

    Having said this, there’s no option for the single event time. Via settings, you can only add the timezone to the event date. However, I’ve created a snippet for you to put in your functions.php file in order to add the timezone to the event time.

    https://gist.github.com/juanfra/7a7410b4c90499f5de596fc549377313

    I hope this helps! If you have any other questions in the meantime please feel free to let me know and I’d be happy to help as best I can!

    Cheers,

    Juan

    #1510552
    Claire Lanyado
    Participant

    Hi Juan,

    Thank you very much for your reply. I’m familiar with the PHP date function and had tried what you suggested before, but this resulted in the same issue. Using the filter you provided and/or appending that code to the proper places in /tribe-events/modules/meta/details.php also results in the same thing. The only timezone displayed is CEST (Central European Standard Time) which as I’ve mentioned we currently have Berlin set as the website timezone in the general WordPress settings. So, something doesn’t seem to be working right here. Can you please help?

    Thanks,
    Claire

    #1510615
    juanfra
    Keymaster

    Hi Claire,

    Thank you for the follow-up.

    Ok, I now understand. Sorry for the confusion. So you configured the time zone in the Time/Date setting in the event. That is stored as meta data, and it can be displayed by directly getting the meta data, if available.

    I’ve updated the code I previously shared with you. Would you please try with this new one?

    https://gist.github.com/juanfra/7a7410b4c90499f5de596fc549377313

    Best,

    Juan.

    #1510670
    Claire Lanyado
    Participant

    Hey Juan,

    This is great. I didn’t find this initially anywhere in the documentation, so if it’s not already there I would suggest you guys add it somewhere. It would probably help a lot of other people who want to display the selected timezone for an event 🙂

    Thanks!
    Claire

    #1510699
    juanfra
    Keymaster

    Hey Claire,

    I’m happy to hear that 🙂

    Perfect, thank you for the suggestion.

    If you have any other questions please feel free to let me know and I’d be happy to help as best I can!

    Regards,

    Juan

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display Timezone For Event’ is closed to new replies.