Tuesday, August 4, 2009

Cambio de zona horaria en ESX

Si tienes mal configurada la zona horaria de tu esx, esto es lo que hay que hacer para corregirlo:

1- Logged in as root, check which timezone your machine is currently using by executing `date`. You'll see something like Tue Aug 4 10:21:53 2009 PM PST, PST in this case is the current timezone.

2- Change to the directory /usr/share/zoneinfo/Posix here you will find a list of time zone regions. Choose the most appropriate region, if you live in Europe this directory is the "Europe" directory.

3- If you wish, backup the previous timezone configuration by copying it to a different location. Such as:
mv /etc/localtime /etc/localtime-old

4- Create a symbolic link from the appropiate timezone to /etc/localtime. Example:
ln -sf /usr/share/zoneinfo/Posix/Europe/Madrid /etc/localtime

5- Restart the ntpd service to update the current system time by executing
/etc/init.d/ntpd restart

6- Set the ZONE entry in the file /etc/sysconfig/clock file
ZONE=Europe/Madrid
UTC=true
ARC=false

7- Set the hardware clock by executing:
/sbin/hwclock --systohc

8- Now if you execute again `date` you'll see the following output Tue Aug 4 10:21:53 CEST 2009

No comments:

Post a Comment