Symptômes : Après avoir vérifié votre zone horaire avec
#cat /etc/timezone
ainsi que l’état de la variable “UTC” dans /etc/default/rcS, l’heure système est toujours décalée.
Le problème peut venir des scripts d’initialisation invoquant la commande hwclock, servant à lire et à sauvegarder l’horloge de la machine.
Méthode de test :
#hwclock --localtime
Si vous obtenez une erreur de ce genre à la place de l’heure :
select() to /dev/rtc to wait for clock tick timed out
Réessayez avec :
#hwclock --directisa --localtime
Si cela fonctionne, il faut modifier les scripts d’initialisation :
Edit the files /etc/init.d/hwclock.sh /etc/init.d/hwclockfirst.sh and change the line (about line #23): HWCLOCKPARS= to read: HWCLOCKPARS="--directisa"
Explication de l’option “–directisa” :
--directisa is meaningful only on an ISA machine or an Alpha (which imple‐ ments enough of ISA to be, roughly speaking, an ISA machine for hwclock’s purposes). For other machines, it has no effect. This option tells hwclock to use explicit I/O instructions to access the Hardware Clock. Without this option, hwclock will try to use the /dev/rtc device (which it assumes to be driven by the rtc device driver). If it is unable to open the device (for read), it will use the explicit I/O instructions anyway. The rtc device driver was new in Linux Release 2.