• Resolved Roniestone

    (@roniestone)


    How can I add AM or PM to the groups table? It only shows the time, which is correct, but some countries need to know if it’s AM or PM since 10:00 is not the same as 10:00 PM. Alternatively, it could show the time in 24-hour format, so it can display 10:00 “AM” or 22:00 “PM”. I tried from the WordPress admin panel, but it doesn’t apply the change; it always shows without AM or PM, or in 12-hour format instead of 24-hour format. Thanks.

    The page I need help with: [log in to see the link]

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

    (@landoweb)

    Thanks for reporting this.

    The match times displayed in the groups table are generated by the JavaScript function wcup_localtime() in the file js/wcp.js. By default, it relies on the browser’s locale settings, which can result in different time formats depending on the user’s system.

    If you prefer a 24-hour format (for example, 10:00 and 22:00), you can modify the wcup_localtime() function to force a 24-hour display:

    var time = d.toLocaleTimeString([], {
        hour: '2-digit',
        minute: '2-digit',
        hour12: false
    });
    

    This will ensure that times are always displayed in 24-hour format, avoiding any ambiguity between AM and PM.

    Please note that this change requires editing the plugin source code, as it is not currently configurable from the WordPress admin panel.

    Thread Starter Roniestone

    (@roniestone)

    Hi Landoweb, thanks for your reply, problem solved.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.