Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

Adjusting ESX Server Time Zone

Solution

To change the time zone, please follow the steps below.
 

Note: It is not necessary to reboot the ESX Server host after following this procedure.

  1. Log into the ESX Server service console as root.
  2. Find the desired time zone under the directory /usr/share/zoneinfo .

    Note: Some regions have multiple files in a subdirectory. For example,
    US contains several files, each representing a time zone.

    The example below uses
    /usr/share/zoneinfo/US/Pacific as the new time zone file.
  3. Use nano ( or another text editor) to open /etc/sysconfig/clock . At the command pompt, type:

    nano /etc/sysconfig/clock

    Edit this file to show the relative path to the file representing the new time zone, and ensure that UTC and ARC are set as shown:

    ZONE="US/Pacific"
    UTC=false
    ARC=false
  4. Copy the desired time zone file to /etc/localtime . Continuing the example using US/Pacific :

    cp /usr/share/zoneinfo/US/Pacific /etc/localtime

    At the cp: overwrite `/etc/localtime'? prompt, answer y to replace the file representing the old time zone. Again, it is not necessary to reboot the ESX Server host after updating /etc/localtime .
  5. Confirm that /etc/localtime has been updated with the correct zoneinfo data using the following steps:

    1. Reference the zoneinfo file used in step 2 and compare it to / etc/localtime using the diff command.

      [root@esxhost]# diff /etc/localtime /usr/share/zoneinfo/US/Pacific

      If the files are identical, your prompt will return without any output.

    2. If /etc/localtime is not the same as the /usr/share/zoneinfo/<your location> , the output from the diff command will be something like the following:

      Binary files /etc/localtime and /usr/share/zoneinfo/US/Pacific differ

      If the files are not the same, repeat step 4.

 

After updating /etc/localtime with the correct zoneinfo data, confirm the system and hardware clocks are correct. Use the Linux date command to check and set the correct time if necessary. Set the hardware clock to match the correct system time.

  1. Set the system clock to the local date and time:

    date MMDDhhmmYYYY
  2. Update the hardware clock with current time of the system clock:

    /sbin/hwclock --systohc

Note: Upon booting, ESX Server runs /etc/rc.d/init.d , which reads /etc/sysconfig/clock to set the system clock based on the hardware clock's current time and the configured time zone information. To synchronize ESX Server to an external time reference, see http://kb.vmware.com/kb/1339 .

 

Reference the VMware Knowledge Base at http://kb.vmware.com for additional information about timezone, including issues with Daylight Saving Time (DST).

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (10 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (10 Ratings)   
Actions