Sunday, February 22, 2015

Linux system time and Hardware clock time - Why and How



There are two types of times in the Linux environment.
System time is the time from OS level. It set up in the time of os installation.
Hardware clock time is the time of hardware level.
Also applications in the operating system uses system time.

System time


To view system time type date in the command prompt as below,
>date
It will show like below,
>Fri Jan 2 12:02:07 IST 2015
To set date in system time type command as below example, change to your appropriate date and time,
>date --set="2 OCT 2006 18:00:00"
More more information please check below url,

Hardware clock time


To view hardware clock time type command as below,
> hwclock
Sat 10 Aug 2013 08:26:12 AM PDT  -0.312862 seconds

> hwclock -r
Sat 10 Aug 2013 08:20:54 AM PDT  -0.109748 seconds

> hwclock --show
Sat 10 Aug 2013 08:21:12 AM PDT  -0.640982 seconds

To set hardware clock time type command like below,

>hwclock --set --date 8/11/2013
 

To Copy system time to hardware time,

>hwclocl –w
Or
>hwclock –systohc

To copy hardware time to system time,

>hwclock –s
Or
>hwclock –hctosys

More more information please check below url,

No comments:

Post a Comment