• I just installed WordPress, and would like to configure it to display time in 24-hour format. The Codex page on this topic doesn’t cover date formats very well, and doesn’t even discuss the time formats:

    <http://codex.ww.wp.xz.cn/Formatting_Date_and_Time&gt;

    So I experimented, and came up with “G:i” as the time format, which does provide 24-hour time. The problem is that it doesn’t prepend a zero to the hour in the range 0-9 — so, e.g., a post created at 0204 (2:04 a.m. in N. American style) shows as “2:04,” not as “02:04,” which would be the correct 24-hour format (the leading zero denotes that the time is being displayed in 24h format).

    I tried adding a leading zero to the “G:i” format, but that just prepended a zero to all displayed times — yielding, e.g., 019:37 (for 7:37 p.m.). So, clearly, that’s not the solution.

    Is there a plugin that provides 24-hour time formats?

    Thanks,
    Vince Sabio

    (Currently running v2.6.)

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

The topic ‘24-Hour Time’ is closed to new replies.