Outre la commande date, l’installation de ntpdate ou du serveur ntp il ne faut pas oublier le réglage du fuseau horaire ou timezone de votre serveur debian.
Vérification fuseau horaire
Vérifier l’actuelle configuration du fuseau horaire de votre serveur
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>timezone
Si le fichier n’existe pas vous este pas défaut a UTC[1] ancienne appellation de GMT [2].
Configurer votre fuseau horaire pour Debian Sarge ou Etch
Lancer la commande tzconfig et répondez aux questions. Voici la séquence pour configurer le fuseau horaire de Paris / France
<span style="color: #808080; font-style: italic;"># tzconfig </span> Your current <span style="color: #000000; font-weight: bold;">time</span> zone is <span style="color: #000000; font-weight: bold;">set</span> to Unknown Do you want to change that? <span style="color: #7a0874; font-weight: bold;">[</span>n<span style="color: #7a0874; font-weight: bold;">]</span>: y Pas de fuseau configuré, répondre oui <span style="color: #7a0874; font-weight: bold;">(</span>y<span style="color: #7a0874; font-weight: bold;">)</span> Please enter the number of the geographic area <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">which</span> you live: <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">)</span> Africa <span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">)</span> Australia <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">)</span> America <span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">)</span> Europe <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">)</span> US <span style="color: #000000; font-weight: bold;">time</span> zones <span style="color: #000000;">9</span><span style="color: #7a0874; font-weight: bold;">)</span> Indian Ocean <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">)</span> Canada <span style="color: #000000; font-weight: bold;">time</span> zones <span style="color: #000000;">10</span><span style="color: #7a0874; font-weight: bold;">)</span> Pacific Ocean <span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">)</span> Asia <span style="color: #000000;">11</span><span style="color: #7a0874; font-weight: bold;">)</span> Use System V style <span style="color: #000000; font-weight: bold;">time</span> zones <span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">)</span> Atlantic Ocean <span style="color: #000000;">12</span><span style="color: #7a0874; font-weight: bold;">)</span> None of the above Then you will be shown a list of cities <span style="color: #c20cb9; font-weight: bold;">which</span> represent the <span style="color: #000000; font-weight: bold;">time</span> zone <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">which</span> they are located. You should choose a city <span style="color: #000000; font-weight: bold;">in</span> your <span style="color: #000000; font-weight: bold;">time</span> zone. Number: <span style="color: #000000;">8</span>
Attention Paris / France c’est 8 Paris / Texas c’est 3
Amsterdam Andorra Athens Belfast Belgrade Berlin Bratislava Brussels Bucharest Budapest Chisinau Copenhagen Dublin Gibraltar Guernsey Helsinki Isle_of_Man Istanbul Jersey Kaliningrad Kiev Lisbon Ljubljana London Luxembourg Madrid Malta Mariehamn Minsk Monaco Moscow Nicosia Oslo Paris Podgorica Prague Riga Rome Samara San_Marino Sarajevo Simferopol Skopje Sofia Stockholm Tallinn Tirane Tiraspol Uzhgorod Vaduz Vatican Vienna Vilnius Volgograd Warsaw Zagreb Zaporozhye Zurich Please enter the name of one of these cities or zones You just need to <span style="color: #7a0874; font-weight: bold;">type</span> enough letters to resolve ambiguities Press Enter to view all of them again Name: <span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #7a0874; font-weight: bold;">]</span> Paris
Difficile de faire plus claire non ?
Your default <span style="color: #000000; font-weight: bold;">time</span> zone is <span style="color: #000000; font-weight: bold;">set</span> to <span style="color: #ff0000;">'Europe/Paris'</span>. Local <span style="color: #000000; font-weight: bold;">time</span> is now: Fri Nov <span style="color: #000000;">23</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">28</span> CET <span style="color: #000000;">2007</span>. Universal Time is now: Fri Nov <span style="color: #000000;">23</span> <span style="color: #000000;">09</span>:<span style="color: #000000;">36</span>:<span style="color: #000000;">28</span> UTC <span style="color: #000000;">2007</span>.
Et voila le fuseau horaire de configuré, l’heure à avancée.
Configurer votre fuseau horaire pour Debian Lenny
Pour une debian Lenny c’est encore plus simple à mon avis vous reconfigurer la zone de fuseau horaire en choisissant Europe / Paris après avoir lancé cette commande
dpkg-reconfigure tzdata
En savoir plus sur l’heure