VMware Cloud Community
pufferdude
Contributor
Contributor

Strange time problem

My ESX 3.02 server refuses to get the correct time -- or more accurately -- date. I have the ESX box pointing at a NTP time source (which is correct) and ESX gets the correct time but not the DATE. Right now it is showing the correct time on December 21, 2007 (instead of December 20, 2007). I check /etc/sysconfig/clock and my zone is correctly set to -6 gmt and UTC=true. Any idea how to troubleshoot this? All other devices that get time from the same NTP source are showing correct date/time... only the ESX box is whacko.

0 Kudos
9 Replies
timw18
Enthusiast
Enthusiast

You could try and force the hardware clock to sync with the NTP server by running hwclock --systohc

0 Kudos
pufferdude
Contributor
Contributor

Thanks for the suggestion... tried that, no luck. I even rebooted (before that) to verify the HW clock was already correct, and it was. What's really bizarre is that even in the VI client the time is correct. It is ONLY at the ESX command line that it thinks it is tomorrow. Normally I wouldn't care but this is causing problems as I'm using esXpress for backups and the timestamps on those are showing the incorrect time (because they get the time from the console, apparently) Smiley Sad

0 Kudos
timw18
Enthusiast
Enthusiast

Is this the only ESX server you have got? Could you rebuild it?

0 Kudos
E_A_
Enthusiast
Enthusiast

Hi pufferdude

What about your broadcastdelay in ntp.conf?

May you post your ntp.conf file?

E.A.

______________________________________________

you do not really understand something

unless you can explain it to your grandmother

(Albert Einstein)

E.A. ______________________________________________ you do not really understand something unless you can explain it to your grandmother (Albert Einstein)
0 Kudos
jlanders
VMware Employee
VMware Employee

You didn't say where your ESX server is located, but you may have the incorrect sign on your timezone offset. The Posix convention uses POSITIVE values for timezones WEST of the Prime Meridian and NEGATIVE values for timezones EAST of the Prime Meridian. So, San Francisco is GMT+8, and Paris is GMT-1. Generally, you are probably better off using geographic names rather than fixed GMT offsets. Timezone data, including corrections for Daylight Savings Time (Summer Time) is located in /usr/share/zoneinfo on the Service Console.

KB Article 1436 has details on how to change the timezone on your ESX system.

Joe

0 Kudos
pufferdude
Contributor
Contributor

Joe, I think you may be on to something... I'm in US Central, so by your description I should be GMT6 instead of GMT-6? I tried editing /etc/sysconfig/clock to be GMT6 (it was GMT-6) and rebooted but that didn't have an effect... when I do date at the console it still shows as GMT-6... so where/how do I change this setting I apparently got wrong during initial ESX install? Thanks!

0 Kudos
eharvill
Enthusiast
Enthusiast

What is the output of "cat /etc/sysconfig/clock"? Compare that to your other hosts...

It sounds like you need to change your timezone. Check out this wiki -

0 Kudos
jlanders
VMware Employee
VMware Employee

Yes, that's correct, Central Time in the United States is GMT+6. But you should know that /etc/sysconfig/clock is used for the system's hardware clock, not the time obtained from the command line and most system utilities. /etc/localtime is used for that conversion. Copy /usr/share/zoneinfo/America/Chicago to /etc/localtime. You can also change /etc/sysconfig/clock to "America/Chicago" if you want. KB Article 1436 has more details.

Joe

0 Kudos
pufferdude
Contributor
Contributor

Thanks guys! Changing the /etc/localtime to the correct zone worked. I guess I just chose wrongly during initial ESX install, when I saw "GMT -6" which is what we really are, just didn't realize Linux did it backwards Smiley Happy

0 Kudos