Tempo de hardware errado no linux

1

Eu não tenho o tempo de hardware correto no meu servidor debian:

root@server[09:48]:date
Tue Dec 22 09:48:52 EST 2015

root@server[09:48]:date -u
Tue Dec 22 14:48:54 UTC 2015 

root@server[09:48]:cat /etc/timezone
Europe/Paris

root@server[09:48]:hwclock -w --utc --debug

hwclock from util-linux 2.25.2
Using the /dev interface to the clock.
Last drift adjustment done at 1450795502 seconds after 1969
Last calibration done at 1450795502 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2015/12/22 14:46:18
Hw clock time : 2015/12/22 14:46:18 = 1450795578 seconds since 1969
1450795578.500007 is close enough to 1450795578.500000 (0.000007 < 0.001000)
Set RTC to 1450795578 (1450795578 + 0; refsystime = 1450795578.000000)
Setting Hardware Clock to 14:46:18 = 1450795578 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Not adjusting drift factor because it has been less than a day since the last calibration.

root@server[09:48]:cat /etc/adjtime

0.000000 1450795578 0.000000
1450795578
UTC

o que devo fazer?

root@server[10:04]:vi /etc/ntp.conf

 18 # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
 19 # pick a different set every time it starts up.  Please consider joining the
 20 # pool: <http://www.pool.ntp.org/join.html>
 21 server ntp.ubuntu.com prefer
 22 server ntp2.jussieu.fr
 23 server 0.fr.pool.ntp.org
 24 server 0.europe.pool.ntp.org

root@server[10:04]:ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 golem.canonical 170.224.124.217  2 u    5   64    1    2.045   -0.616   0.000
 horlogegps.rese 10.3.128.189     2 u    4   64    1    9.276   -0.195   0.000
 62-210-204-185. 193.190.230.65   2 u    3   64    1    9.696    2.003   0.000
 static.140.107. 192.53.103.108   2 u    2   64    1   16.062    1.159   0.000
    
por mathieu 22.12.2015 / 16:16

1 resposta

3

Seu fuso horário está definido como EST (horário padrão do leste dos EUA), que é o fuso horário de Nova York, não de Paris. O horário de Paris é na CET (Central Europe Time).

Primeiro, você precisa definir corretamente o fuso horário e isso pode ser feito de várias maneiras:

  • use o comando tzselect
  • use o comando dpkg-reconfigure tzdata
  • digite TZ='Europe/Paris'; export TZ em ~/.bash_profile , ~/.bash_login ou ~/.profile

Quando o fuso horário estiver correto, você pode definir a hora correta (se necessário).

    
por 22.12.2015 / 19:29