• I have been trying to display the event’s time zone on the “My Calendar Setting -> Text -> Time Format.” The default time format is g:i a. Checking the link provided there for the PHP date. I have added g:i a T, when I check the direct link of the event, the date shows correctly, for example, 4 pm EDT, but on the list view, on the grid view, and also on shortcodes for upcoming events those shows way wrong the date gets changed to 4:00 PM GMT nothing else no +5 or -5 to indicate it is EDT, is there any way this can be fixed.

    I also noticed that when using the {time} it shows the GMT, but on the {endtime} it does show EDT. Should they both show at the same Timezone?

    Another example would be how the upcoming date is shown “2:00 pm GMT – 4:00 pm EDT, October 2, 2024″ it should be “2:00 pm EDT – 4:00 pm EDT, October 2, 2024″

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    The date as rendered on the front end usually doesn’t retain the timezone information, because (to be honest) My Calendar uses a kind of arcane workaround to manage timezones.

    There are a couple of options. One of them is that you can just use plain text to add timezones manually, not in the time format. Since My Calendar doesn’t include support for specifying a different timezone for an event, all events should be in the same timezone.

    Another option is adding a custom field where you can specify the timezone for an event, and outputting that data.

    Thread Starter sadesades

    (@sadesades)

    Could you add like you have the end time on the “my-calendar-templates.php” but for start time since using {time} adds GMT instead of the time zone of the server

    at the @hook mc_date_utc_format

    $starttime = ( '23:59:59' === $event->event_begin ) ? '00:00:00' : mc_date( 'H:i:s', strtotime( $real_begin_date ), false );

    $e['starttime'] = ( '00:00:00' === mc_date( 'H:i:s', strtotime( $real_begin_date ), false ) ) ? $notime : date_i18n( mc_time_format(), strtotime( $starttime ) );

    When adding this one it does keep the correct timezone EDT instead of GMT

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.