VMware Cloud Community
okeedokee
Enthusiast
Enthusiast
Jump to solution

Date command shows different time from Time Config in VI Client

Looking in the VI Client on Configuration/Time Configuration shows the NTP Client running and the correct date and time. Issuing "date" on the console gives a different time, thought the date and time zone are correct.

I changed the time on the console also using the date command. A little later, issuing "date" results in the time being way off. The correct time still shows in the VI Client.

What is happening and how can I fix it?

Thanks

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal
Jump to solution

Have you tried to manually correct the time after you updated the timezone? If the clock is only off by the hour, then it would appear that the system time did not update itself after the timezone was modified. You'll have to correct the time manually using date. And after which, make sure to run 'hwclock --systohc' to make sure the BIOS time is corrected as well, so a reboot does not mess things up for you.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB

View solution in original post

0 Kudos
7 Replies
Leafy911
Expert
Expert
Jump to solution

Hi

See if this thread helps you http://communities.vmware.com/message/752963#752963

Regards

Leafy911

(Dont forget you recieve points when you award points)

Regards Leafy911 (Dont forget you recieve points when you award points)
okeedokee
Enthusiast
Enthusiast
Jump to solution

Running cat /etc/sysconfig/clock did reveal that my time zone was incorrect. I updated this but still have a big discrepancy between date and the time shown in VI.

Regards

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

Is your ESX server in a different time zone than where your client is running? vi client will reflect the current time, based on your current timezone from where your client is running. It will compensate for any timezone differences, but the time itself should be correct. Are you seeing differences in only the hour?

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
okeedokee
Enthusiast
Enthusiast
Jump to solution

No, both are in the same time zone. The differences are only in the hour.

Thanks

0 Kudos
okeedokee
Enthusiast
Enthusiast
Jump to solution

I rebooted and found the wrong time in the system setup. I corrected it, but still have the following results. It's currently March 3, 10:18 a.m. EST.

Time zone is "America/Kentucky/Monticello"

date shows March 3, 20:18:40 GMT-5

clock shows March 3, 08:18:40 PM GMT-5

date & time in VI Client shows March 3, 10:18 as it should

At this point, do I just need to manually set the time on the host using the "date" command?

Thanks

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

Have you tried to manually correct the time after you updated the timezone? If the clock is only off by the hour, then it would appear that the system time did not update itself after the timezone was modified. You'll have to correct the time manually using date. And after which, make sure to run 'hwclock --systohc' to make sure the BIOS time is corrected as well, so a reboot does not mess things up for you.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
okeedokee
Enthusiast
Enthusiast
Jump to solution

I think I was forgetting the hwclock command. Setting the date and hwclock after the time zone change corrected the problem. I just verified with a reboot. Thanks for the help.

Regards

0 Kudos