Problemas con la hora sincronizada con ntp UTC/CST en Centos


Bueno en un post anterior publique cómo configurar con un servidor ntp, el problema era la hr, no concordaba con la región que debía. Para ello use dos comandos, el primero:

yum install tzdata

Una vez instalado usamos tzselect y seguimos el wizard con las opciones que nos ira dando, es seleccionando números:

# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 2
Please select a country.
1) Anguilla 28) Haiti
2) Antigua & Barbuda 29) Honduras
3) Argentina 30) Jamaica
4) Aruba 31) Martinique
5) Bahamas 32) Mexico
6) Barbados 33) Montserrat
7) Belize 34) Nicaragua
8) Bolivia 35) Panama
9) Bonaire Sint Eustatius & Saba 36) Paraguay
10) Brazil 37) Peru
11) Canada 38) Puerto Rico
12) Cayman Islands 39) Sint Maarten
13) Chile 40) St Barthelemy
14) Colombia 41) St Kitts & Nevis
15) Costa Rica 42) St Lucia
16) Cuba 43) St Martin (French part)
17) Curacao 44) St Pierre & Miquelon
18) Dominica 45) St Vincent
19) Dominican Republic 46) Suriname
20) Ecuador 47) Trinidad & Tobago
21) El Salvador 48) Turks & Caicos Is
22) French Guiana 49) United States
23) Greenland 50) Uruguay
24) Grenada 51) Venezuela
25) Guadeloupe 52) Virgin Islands (UK)
26) Guatemala 53) Virgin Islands (US)
27) Guyana
#? 32
Please select one of the following time zone regions.
1) Central Time
2) Eastern Standard Time - Quintana Roo
3) Central Time - Campeche, Yucatan
4) Central Time - Durango; Coahuila, Nuevo Leon, Tamaulipas (most areas)
5) Central Time US - Coahuila, Nuevo Leon, Tamaulipas (US border)
6) Mountain Time - Baja California Sur, Nayarit, Sinaloa
7) Mountain Time - Chihuahua (most areas)
8) Mountain Time US - Chihuahua (US border)
9) Mountain Standard Time - Sonora
10) Pacific Time US - Baja California
11) Central Time - Bahia de Banderas
#? 1

The following information has been given:

Mexico
Central Time
Therefore TZ='America/Mexico_City' will be used.
Local time is now: sáb ene 6 09:41:18 CST 2018.
Universal Time is now: sáb ene 6 15:41:18 UTC 2018.
Is the above information OK?
1) Yes
2) No
#? yes
Please enter 1 for Yes, or 2 for No.
#? 1
You can make this change permanent for yourself by appending the line
TZ='America/Mexico_City'; 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:
America/Mexico_City

Y el siguiente comando:

# timedatectl set-timezone America/Mexico_City

Y listo la hr esta de acuerdo a mi zona horaria

[root@hypervisor rafex]# timedatectl
Warning: Ignoring the TZ variable. Reading the system's time zone setting only.

Local time: sáb 2018-01-06 12:05:28 CST
Universal time: sáb 2018-01-06 18:05:28 UTC
RTC time: sáb 2018-01-06 18:05:28
Time zone: America/Mexico_City (CST, -0600)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
dom 2017-10-29 01:59:59 CDT
dom 2017-10-29 01:00:00 CST
Next DST change: DST begins (the clock jumps one hour forward) at
dom 2018-04-01 01:59:59 CST
dom 2018-04-01 03:00:00 CDT

Referencias:

http://www.uptimemadeeasy.com/linux/set-linux-time-date-timezone/

Deja un comentario

Este sitio utiliza Akismet para reducir el spam. Conoce cómo se procesan los datos de tus comentarios.