Module clock
Expand description
The clock as a person reads it: local date and time.
local_now is the wall clock in the local time zone. Read it instead of
chrono::Local::now(): a screenshot capture pins it
(freeze_for_capture) so a frame shows the same date and time on every
run, and an app that reads the system clock directly breaks that.
time_of_day renders a time the way the person reads clocks, in the
TimeStyle they chose in Settings. Every clock display goes through it
rather than a fixed %H:%M.
Clock types and epoch readings are ui::time’s.
Enums§
- Time
Style - How times of day render: the shared
locale.time_formatsetting.
Constants§
- CAPTURE_
LOCAL_ TIME - The local date and time every screenshot capture shows: 30 June 2026, 10:42.
Functions§
- freeze_
for_ capture - Pin the wall clock to
CAPTURE_LOCAL_TIMEin the local time zone for the rest of the process. The launcher calls this before it builds an app for--shots; never call it in a live session. - hour_
minute time_of_dayfor a time kept as an hour (0..24) and a minute.- local_
now - The current local date and time.
- time_
of_ day timeas the person reads clocks:14:05or2:05 PM.- today
- Today’s local date.