Linuxシステムでのシステム時間とハードウェア時間の表示
5724 ワード
Linuxシステムでのシステム時間とハードウェア時間の表示
1.具体的なコマンドは以下のとおりです.
2.
1.具体的なコマンドは以下のとおりです.
[root@littlelawson hbase-1.4.0]# date
Mon Jun 18 10:36:45 PDT 2018
[root@littlelawson hbase-1.4.0]# date -s 21:48:00
Mon Jun 18 21:48:00 PDT 2018
[root@littlelawson hbase-1.4.0]# hwclock
Mon 18 Jun 2018 09:51:01 PM PDT -0.969901 seconds
,' / / '
[root@littlelawson hbase-1.4.0]# hwclock --set --date='06/18/18 21:50'
[root@littlelawson hbase-1.4.0]# hwclock --systohc
[root@littlelawson hbase-1.4.0]# hwclock
daMon 18 Jun 2018 09:52:23 PM PDT -0.391427 seconds
[root@littlelawson hbase-1.4.0]# date
Mon Jun 18 21:52:23 PDT 2018
2.
hwclock[hardware clock]
コマンドについて-s, --hctosys
Set the System Time from the Hardware Clock.# ,
Also set the kernel’s timezone value to the local timezone as
indicated by the TZ environment variable and/or
/usr/share/zoneinfo, as tzset(3) would interpret them. The
obsolete tz_dsttime field of the kernel’s timezone value is
set to DST_NONE. (For details on what this field used to
mean, see settimeofday(2).)
This is a good option to use in one of the system startup
scripts.
-w, --systohc
Set the Hardware Clock to the current System Time.## ,