[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
fr:howtos:hardware:syncing_hardware_clock_and_system_local_time [2021/11/29 08:08 (UTC)] – créée desideriusfr:howtos:hardware:syncing_hardware_clock_and_system_local_time [2023/11/14 12:56 (UTC)] (Version actuelle) desiderius
Ligne 5: Ligne 5:
 ===== Aperçu du problème ===== ===== Aperçu du problème =====
  
-Si vous avez plusieurs distributions sur le même machine, vous pouvez renconter le problème de temps inconsistant entre les distributions. Par exemple, si vous avez pouvez démarrer votre ordinateur avec deux distributions différentes, Distro X et Distro Y, il vous faut régler l'horloge matérielle du BIOS pour afficher l'heure locale+Si vous avez plusieurs distributions sur la même machine, vous pouvez rencontrer le problème de temps inconsistant entre les distributions. Par exemple, si vous avez pouvez démarrer votre ordinateur avec deux distributions différentes, Distro X et Distro Y, il vous faut régler l'horloge matérielle du BIOS pour afficher l'heure locale.
-If you are booting multiple Linux distributions on the same machine, you might face the problem of inconsistent time zone settings across distributions. For example, assume you are dual-booting two Linux distributions, Distro X and Distro Y. You have set your BIOS hardware clock to show the local time+
  
-If Distro X is configured to read the hardware clock as local timeit will show the time correctlybut if Distro Y is configured to read  the hardware clock as set to UTC, then it will show an incorrect time+Si la distribution Distro X est configurée pour lire l'horloge matérielle comme heure localeelle affichera une heure correctemais si elle est configurée pour lire l'horloge matérielle comme une heure UTC, alors elle affichera une heure incorrecte.
  
-This HOWTO attempts to provide a simple and cross-distribution one-time solution to the issuemaking sure all your distributions know that your hardware clock is set to the local time (or UTC if you prefer it). +Cet HOWTO vous propose une solution simple et uniquevalable pour toutes les distributions qui vous assurera d'avoir votre horloge matérielle  toujours réglée sur l'heure locale ou UTC si vous préférez).
  
-<note tip>The other solution to time management on a system is to synchronize your computer's clock with an NTP (Network Time Protocol) server.</note>+<note tip> L'autre solution pour gérer l'horloge d'un système est de synchroniser votre horloge matérielle avec un serveur NTP (Network Time Protocol) </note>
  
-===== Procedure to Synchronize the System Time to Hardware Clock ===== 
  
-This is a one-time procedure to ensure that your hardware clock's time zone is correctly and consistently recognized by all the Linux installations you multiboot on a single machine.+===== Procédure pour synchroniser votre horloge système avec votre horloge matérielle  ===== 
 + 
 +C'est une procédure à faire une seule fois pour vous assurer que votre horloge matérielle est reconnue correctement par toutes les distributions Linux que vous utilisez sur une seule et même machine. 
 + 
 +Supposons que vous puissiez démarrer Distro X et Distro Y, démarrez d'abord la distribution Distro X. Vérifiez d'abord votre horloge matérielle avec la commande suivante : 
  
-Assuming you are dual-booting Distro X and Y, first boot into Distribution X. First check the hardware clock with the following command. 
    hwclock --show        hwclock --show    
-If your hardware clock is not set to your local time, then you must set the system time to local time. As root, 
  
-**Update via NTP:** If you installed the ntp package you can: \\+Si votre horloge matérielle n'est pas réglée sur l'heure locale, il faut mettre l'heure système à l'heure locale. En tant que root, tapez la commande  
 + 
 + 
 +**Update via NTP:** Si vous avez installé le package ntp, vous pouvez taper: \\
      ntpdate pool.ntp.org      ntpdate pool.ntp.org
--or- \\ +-ou- \\ 
-**Manual update:** \\+**Mise à l'heure manuelle :** \\
      date --set "5 Aug 2012 12:54 IST"      date --set "5 Aug 2012 12:54 IST"
-Obviously in the above command you must set your date, time and time zone correctly.+Bien sûr, dans la commande précédente, il faut mettre la date, l'heure et la zone horaire correspondantes à votre situation. 
 + 
 +Maintenant, en tant que root, synchronisez l'horloge matérielle à l'heure système courante en tant qu'heure locale.
  
-Now as root, synchronize the hardware clock to the current system time as local time. 
    hwclock --systohc --localtime    hwclock --systohc --localtime
-Now the hardware clock is readjusted to the system time and both now point to the local time.+    
 +Maintenant, l'horloge matérielle est synchronisée avec l'horloge système et toutes les deux sont à l'heure locale
  
-<note>Obviously there are other ways to achieve the same effect, but this process is least likely to confuse as you set initial time inside the Operating System and then adjust the BIOS clock accordingly.</note>  
  
-Now boot into Distro Y and follow the same steps as above. It doesn't matter that the hardware clock is now set correctly, you can still reset the clock once to make sure that every distribution you multi-boot recognizes the hardware clock as set to the local time.  
  
-===== Syncing to UTC instead of Local Time =====+<note>Évidemment, il y a d'autres moyens d'arriver aux mêmes résultats, mais ce processus est moins sujet à confusion puisque vous positionnez  l'heure locale dans le système d'exploitation puis vous ajustez l'horloge matérielle pour la synchroniser.</note> 
 + 
 +Démarrez à présent avec la distribution Y et suivez les mêmes étapes que précédemment. Cela ne fait rien si l'heure matérielle n'est pas correctement affichée, vous pouvez encore remettre à l'heure l'horloge pour être sûr que chaque distribution que vous démarrerez reconnaitra l'horloge matérielle comme configurée avec l'heure locale. 
 +  
 + 
 +===== Synchronisation avec l'UTC au lieu de l'heure locale ===== 
 + 
 +Certaines personnes préfèrent régler leur horloge matérielle à l'UTC (Universal Coordinated Time) au lieu de l'heure locale. Si vous voulez positionner votre horloge matérielle à UTC et ajustez la date et l'heure conformément, suivez les étapes ci-dessus en changeant simplement la commande ''hwclock'' à
  
-Some people prefer setting their hardware clock to UTC (Universal Coordinated Time) instead of local time. If you want to set your hardware clock to UTC and adjust the date/time accordingly, use the above steps but simply change the ''hwclock'' command to  
    hwclock --systohc --utc    hwclock --systohc --utc
-while setting the hardware clock from your system time.+    
 +en réglant votre horloge matérielle à l'aide votre horloge système. 
 +.
  
-<note important>Be consistent in time settings across Operating Systems when you dual bootIf you use different settings in different Operating Systemsyour local time will be messed up.</note>+ 
 +<note important>Soyez cohérent en réglant l'heure dans vos différentes distributionsSi vous utilisez différents réglages dans les différentes distributionsvotre heure locale sera mal affichée. </note> 
 + 
 +<note>Ajout du traducteur français : Cette procédure fonctionne également si vous vous démarrez Windows et Linux sur la même machine. Si vous réglez l'heure locale sur la même valeur sur les deux systèmes (locale ou UTC ), votre heure système sera correcte dans les deux systèmes.</note>
  
 ====== Sources ====== ====== Sources ======
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->
-  * Originally written by [[wiki:user:vharishankar|Harishankar]] for the SlackDocs Wiki Project +  * Article original par [[wiki:user:vharishankar|Harishankar]] pour le  SlackDocs Wiki Project 
-  * Based on Harishankar's blog article [[http://harishankar.org/blog/entry.php/how-to-set-your-computer-039-s-hardware-clock-to-local-time-and-make-linux-recognize-it|here ]]+  * Basé sur l'article de blog de Harishankar [[http://harishankar.org/blog/entry.php/how-to-set-your-computer-039-s-hardware-clock-to-local-time-and-make-linux-recognize-it|ici ]] 
 +  * Traduction francaise [[wiki:user:desiderius| Désiderius]]
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
 <!-- * Originally written by [[wiki:user:xxx | User X]] --> <!-- * Originally written by [[wiki:user:xxx | User X]] -->
 +
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
  
 fr:howtos:hardware:syncing_hardware_clock_and_system_local_time ()