Ici sur le forum https://hyliatyde.space/forum/viewtopic.php?pid=54746#p54746
Slax ayant pour base Debian Stretch, les procédures de cette dernière s'appliquent.
Pour régler le temps (pas la météo ), tout est disponible, en particulier dans le dossier /usr/share/zoneinfo.
tzselect
Please identify a location so that time zone rules can be set correctly. Please select a continent, ocean, "coord", or "TZ". 1) Africa 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean 10) coord - I want to use geographical coordinates. 11) TZ - I want to specify the time zone using the Posix TZ format. #? 7 Please select a country whose clocks agree with yours. 1) Åland Islands 18) Greece 35) Norway 2) Albania 19) Guernsey 36) Poland 3) Andorra 20) Hungary 37) Portugal 4) Austria 21) Ireland 38) Romania 5) Belarus 22) Isle of Man 39) Russia 6) Belgium 23) Italy 40) San Marino 7) Bosnia & Herzegovina 24) Jersey 41) Serbia 8) Britain (UK) 25) Latvia 42) Slovakia 9) Bulgaria 26) Liechtenstein 43) Slovenia 10) Croatia 27) Lithuania 44) Spain 11) Czech Republic 28) Luxembourg 45) Svalbard & Jan Mayen 12) Denmark 29) Malta 46) Sweden 13) Estonia 30) Moldova 47) Switzerland 14) Finland 31) Monaco 48) Turkey 15) France 32) Montenegro 49) Ukraine 16) Germany 33) Netherlands 50) Vatican City 17) Gibraltar 34) North Macedonia #? 15 The following information has been given: France Therefore TZ='Europe/Paris' will be used. Local time is now: Sun Jan 3 12:44:59 CET 2021. Universal Time is now: Sun Jan 3 11:44:59 UTC 2021. Is the above information OK? 1) Yes 2) No #? 1 You can make this change permanent for yourself by appending the line TZ='Europe/Paris'; export TZ to the file '.profile' in your home directory; then log out and log in again. Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect command in shell scripts: Europe/Paris
date -s "03/01/2021 12:44:12"
Vérifions :
date
dimanche 3 janvier 2021, 12:44:12 (UTC+0100)
Pour un réglage pile poil de l'heure, il est nécessaire d'installer le serveur NTP :
apt policy ntp
ntp: Installé : (aucun) Candidat : 1:4.2.8p10+dfsg-3+deb9u2 Table de version : 1:4.2.8p10+dfsg-3+deb9u2 500 500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages
On installera les paquets ntp et ntpdate :
apt install ntp ntpdate
Puis on paramétrera les noms des serveurs de référence, par exemple server 0.fr.pool.ntp.org server 1.fr.pool.ntp.org server 2.fr.pool.ntp.org à indiquer dans le fichier /etc/ntp.conf.
Enfin, on lancera le démon NTP :
service ntp start