Files
mcde/include
lotherk 6398b40b08 MCDE dtsystemsettings: Date & Time with three tabs (t0103)
The pane is the reference's window now: the big clock, the date and the
zone, then Date & Time | Time Zone | Clock.

Date & Time: "Set date & time automatically:" with the server
(pool.ntp.org by default) and "Apply Time Service"; a month calendar with
the weekday row and < > for the months (the chosen day pressed), a time
field with "Now", an analog clock drawn on Expose and once a minute, and
"Set Date and Time".  Both root actions run in the su(1) terminal the
program already uses: dtsystemsettings -set-time EPOCH and -set-ntp on|off
SERVER.  Below: "To set date and time formats, use Language & Region." and
a button that opens that pane.

Clock: the bar's clock -- shown or not, 24-hour, seconds, weekday, date --
written to ~/.dt/clock ("show=", "format="), which dtbar reads at its next
minute (measured: format=%H:%M leaves "07:49" in the bar).

McdeSys has the system side: mcde_sys_ntp_get/set (NetBSD: ntpd=YES in
rc.conf, the pool line of ntp.conf, /etc/rc.d/ntpd start/stop; Linux:
timedatectl set-ntp and timesyncd.conf) and mcde_sys_time_set
(settimeofday(2), root).

Measured under Xvfb: the three tabs render
(docs/screenshots/leopard/System-Preferences-Date-and-Time-mcde.png,
...-Time-Zone-mcde.png, ...-Clock-mcde.png); the Clock tab writes
"show=1" and "format=%a %e %b  %H:%M" to ~/.dt/clock, and dtbar with that
file shows the chosen format.

Not run: the root paths (this session has no root, and setting the
development host's clock or switching its NTP on is a hazard).  The tests
the task asks for -- ntpd=YES in /etc/rc.conf, ntpd running, date(1)
changed -- belong in the test VM; the commands they use are the two above.
2026-11-14 07:54:06 +00:00
..