Time
5.1
The clock of the system, its time zone, the hardware clock of the machine, and NTP to keep it all on time from the network. The Handbook shows the main commands in Settings: language, keyboard, time.
The graphical way
Open Settings, page Date and time:
- Time zone: choose your area and city.
- Set the time from the Internet: set the clock now with NTP.
- Set the time by hand: without Internet access.
A new time zone applies to the programs started after the change; the ones already open follow it at the next login.
The command line
trame time does the same. Reading needs no rights, changing needs
root:
$ trame time get
$ trame time tz list Europe
# trame time tz set Europe/Paris
# trame time ntp
# trame time set 2026-11-25T18:30
trame time set takes the local time, as YYYY-MM-DD HH:MM, with a
T or a space between the date and the hour (quote it with the
space). Add --dry-run to see what a command would change.
The time zone
SliTaz keeps the time zone in /etc/TZ: a name like Europe/Paris, or
a POSIX string like CET-1CEST,M3.5.0,M10.5.0/3. At login,
/etc/profile puts it in the TZ variable. The zone files are in
/usr/share/zoneinfo, from the tzdata package; trame time tz set
also points /etc/localtime to the zone file.
On a live system, give the zone with the boot option tz=, for example
tz=Europe/Paris. Without it, SliTaz guesses it from the keyboard, or
uses UTC. See boot options.
The hardware clock
The machine keeps the time when it is off in its hardware clock (RTC).
SliTaz keeps the RTC in UTC: the kernel reads it at boot, and
trame time set and trame time ntp write the new time back to it.
By hand, with BusyBox hwclock:
# hwclock -u -w
# hwclock -u -s
The first command saves the time of the system to the RTC, the second
sets the system from the RTC. Always give -u (UTC) or -l (local
time): without it, hwclock does not know how the RTC is kept.
Dual boot with Windows
Windows keeps the RTC in local time, so SliTaz shows a wrong hour after
running Windows. Tell SliTaz the RTC is in local time with the boot
option rtc=local. It writes /etc/adjtime with LOCAL on its third
line; at boot SliTaz then reads the RTC as local time, and trame time
writes it the same way. On an installed system, you can also create
that file once:
# printf '0.0 0 0.0\n0\nLOCAL\n' > /etc/adjtime
NTP
NTP sets the clock from time servers on the network. BusyBox ntpd is
on every image. Use the servers of pool.ntp.org,
or of your country: fr.pool.ntp.org, de.pool.ntp.org...
Once
trame time ntp asks pool.ntp.org, or the server you give it, then
saves the time to the RTC. It is the same as:
# ntpd -q -n -p pool.ntp.org && hwclock -u -w
All the time
The ntpd service keeps the clock right while the machine runs. Its
servers are in NTPD_OPTIONS, in /etc/daemons.conf; give -p once
per server:
NTPD_OPTIONS="-p 0.fr.pool.ntp.org -p 1.fr.pool.ntp.org"
Start it, and enable it at boot:
# trame service start ntpd
# trame service enable ntpd
Add -l to the options to serve the time to the other machines of
your network (UDP port 123).
The ntp package
The ntp package is the full NTP suite, with ntpq and ntpdate.
Most users don't need it. Its service is ntp, not ntpd, its server
is /usr/bin/ntpd (ntpd alone may be the BusyBox one), and its
servers are in /etc/ntp.conf. Leave NTP_OPTIONS unset: there -p
means a PID file, not a server. Run only one of the two services.
$ ntpq -p
lists the servers it uses; a * marks the one it follows.
Troubleshooting
The hour is off by one or two hours, the minutes are right: a time
zone problem. Check trame time get, then set the zone. If it happens
after Windows ran, see the dual boot section.
trame time ntp fails: no network yet, or UDP port 123 is blocked.
Check with ping pool.ntp.org.
The clock is wrong again after a reboot: the time was set without
saving it to the RTC. Run hwclock -u -w, or set the time again with
trame time. If the clock is lost each time the machine is unplugged,
the battery of the RTC is dead.