• Resolved Graham

    (@sandgroper)


    One of my customers picked up the fact that on the Group page, the time is in 24hr format.

    In group-events.php on line 122 is:

    echo substr ( $EM_Event->start_time, 0, 5 ) . " - " . substr ( $EM_Event->end_time, 0, 5 );

    In the database it is stored as 24hr format.

    Is there any way to display it as:

    #_12HSTARTTIME – #_12HENDTIME

    I know it’s nit-picking, but I said I would ask.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    yes, you can try to format the time similar to line 58-59 but use dbem_time_format instead

    to use templates: https://wp-events-plugin.com/documentation/using-template-files/

    eg. wp-content/themes/Your Theme/plugins/events-manager/buddypress/group-events.php

    Thread Starter Graham

    (@sandgroper)

    Hi Angelo,

    I am using a child file.

    My programming skills are pretty much level 101. I created:

    $localised_start_time = time_i18n(get_option('dbem_time_format'), $EM_Event->start);
    $localised_end_time = time_i18n(get_option('dbem_time_format'), $EM_Event->end);

    But trying to use it in any way either made the whole table disappear or only the date to show.

    I would need more detailed instructions on what to put where in that file.

    Thread Starter Graham

    (@sandgroper)

    Solved it by seeing how time is displayed on events page. Copied the following code to replace line 122:

    echo date_i18n(get_option('time_format'), $EM_Event->start) . " - " . date_i18n(get_option('time_format'), $EM_Event->end);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Group Events Time’ is closed to new replies.