Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Whether 12 hour or 24 hour is used is determined by your time option in WordPress’ general settings (i.e. whether that displays 12 hour or 24 hour time).

    For instance if its something like ‘g:ia’ it uses 12 hour format, if it something likeH:i it uses 24 hour format.

    There’s no option to change that. Though I’ll add a filter.

    Thread Starter dirk@d10n

    (@dirkd10n)

    Ooompf, silly me … switched to the correct time format in general settings and the EO time selector in the backend runs just fine. This plugin IS AWE-SOME, Stephen!! Was a bit confused ’cause the german WP backend looks like this: https://d10n.de/t/clipboard2.jpg ( >> first radio button actually keeps the 12h format, the third switches to 24h… )

    Thanks!
    Dirk

    According to PHP manual, the time format is defined as follows:

    g – 12-hour format of an hour without leading zeros
    G – 24-hour format of an hour without leading zeros
    h – 12-hour format of an hour with leading zeros
    H – 24-hour format of an hour with leading zeros

    Therefore, the function eo_blog_is_24() in event-organiser-utility-functions.php at line 1162, should be something like:

    function eo_blog_is_24() {
    $time = get_option('time_format');
    if ( strpos($time, 'G') !== false OR strpos($time, 'H') !== false ) $is_24 = true;
    else $is_24 = false;

    $is_24 = apply_filters( 'eventorganiser_blog_is_24', $is_24 );
    return $is_24;
    }

    So Dirks G:i also works as expected.

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