Set system date in Linux Red
Hat
Red Hat
Version
[root@linux1
~]# cat /etc/*release
Red
Hat Enterprise Linux Server release 5.6 (Tikanga)
[root@linux1
~]#
Type the
following hwclock command to read the Hardware Clock and display the time on
screen:
# hwclock
-r
Sun 29
May 2016 05:11:48 PM EDT -0.017419
seconds
#
OR
#
hwclock --show
Sun 29
May 2016 05:12:01 PM EDT -0.016364
seconds
#
OR
#
hwclock --show --utc
Sun 29
May 2016 05:12:17 PM EDT -0.016073
seconds
#
Verify
current date
[root@linux1
~]# date
Thu
May 26 17:17:27 EDT 2016
[root@linux1
~]#
Set new
Date
[root@linux1
~]# date -s "26 May 2016 21:18:10"
Thu
May 26 21:18:10 EDT 2016
[root@linux1
~]#
Verification
[root@linux1
~]# date
Thu
May 26 21:18:11 EDT 2016
[root@linux1
~]#