Activities

August 2011
M T W T F S S
« Jul   Sep »
1234567
891011121314
15161718192021
22232425262728
293031  

Set the hardware clock from the system clock

An application running over one of the server is showing different time than system time. I have checked the system time and time zone. But the application still showing some different value ?

Any Guess how this values come out ????

Solution : The issue is My application is talking time from the hardware clock rather than system time.

How to correct this
set the hardware clock synchronize with system time. Execute the following command to do this,
hwclock –systohc –utc

Eg:

[root@conn-web05 ~]# hwclock --show
Mon 01 Aug 2011 09:56:25 AM EDT  -0.593770 seconds
[root@conn-web05 ~]# date
Mon Aug  1 12:56:30 EDT 2011
[root@conn-web05 ~]# hwclock --systohc --utc
[root@conn-web05 ~]# date
Mon Aug  1 12:57:27 EDT 2011
[root@conn-web05 ~]# hwclock --show
Mon 01 Aug 2011 12:57:40 PM EDT  -0.447477 seconds
[root@conn-web05 ~]#

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>