set clock_24hour
Synopsis
/set clock_24hour [on|off|toggle]
Default: off. With no value, set displays the current value. toggle reverses it; other values are rejected as invalid boolean settings.
Description
When on, EPIC's ordinary clock uses 24-hour time, such as 21:05. When off, it uses 12-hour time with a leading zero and an AM/PM designation, such as 09:05PM. The latter designation comes from the system's strftime %p conversion and can depend on the active locale.
The cached clock is available to scripts through $Z and to the status bar's %T field through status_clock. The clock setting controls regular updates and whether the standard status-clock field is shown.
Precedence and effects
A configured clock_format takes precedence over this setting. Unset that string with /set -clock_format to restore selection between the two built-in formats. With metric_time on, the metric clock path ignores both ordinary formats.
Changing clock_24hour immediately recalculates the clock, even when its regular timer is disabled. It requests status updates when status_clock is nonempty. It does not change the system timezone or server time, and sends no IRC request.
This is a display-format setting, not the format selector for on timer. In ordinary time that hook always receives zero-padded 24-hour HH:MM, independent of this value. A recalculation can also invoke timer and idle if it observes a new hour or minute.
Example
Select the ordinary 24-hour clock:
/set metric_time off
/set -clock_format
/set clock_24hour on
Use /set clock_24hour off for the ordinary 12-hour clock. Leave clock on for regular updates to $Z.
Source references
source/clock.c:reset_standard_clockselects custom format,%R, or%I:%M%pin that order;reset_clockchooses ordinary or metric mode and requests status updates.source/status.c:status_clockuses the cached clock for the status field.source/functions.c:$Zreturnsget_clock().source/vars.candinclude/config.h: boolean registration, reset callback, and default off.