Moxa DA-710-XPE [16/73] Setting the time manually

Moxa DA-710-XPE [16/73] Setting the time manually
DA-710 Series Linux Software Configuration
2-5
Adjusting the System Time
The DA-710-LX has two time settings. One is the system time, and the other is provided by an RTC (Real Time
Clock) built into the DA-710- LX’s hardware.
Setting the Time Manually
Use the date command to query the current system time or set a new system time. Use hwclock to query the
current RTC time or set a new RTC time.
Use the following command to set the system time.
# date MMDDhhmmYYYY
MM
:
Month
DD
:
Date
h
hmm:
H
our and Minute
YYYY
:
Year
Use the following command to write the current system time to the RTC.
# hwclock –w
MOXA:~# date
Fri Jun 23 23:30:31 CST 2000
MOXA:~# hwclock
Fri Jun 23 23:30:35 2000 -0.557748 seconds
MOXA:~# date 120910002004
Thu Dec 9 10:00:00 CST 2004
MOXA:~# hwclock –w
MOXA:~# date ; hwclock
Thu Dec 9 10:01:07 CST 2004
Thu Dec 9 10:01:08 2004 -0.933547 seconds
MOXA:~#
NTP Client
The DA-710-LX has a built-in NTP (Network Time Protocol) client that is used to initialize a time request to a
remote NTP server. Use ntpdate to update the system time.
#ntpdate time.stdtime.gov.tw
#hwclock –w
Visit http://www.ntp.org for more information about NTP and NTP server addresses.
MOXA:~# date ; hwclock
Sat Jan 1 00:00:36 CST 2000
Sat Jan 1 00:00:37 2000 -0.772941 seconds
MOXA:~#
MOXA:~# ntpdate time.stdtime.gov.tw
9 Dec 10:58:53 ntpdate[207]: step time server 220.130.158.52 offset 155905087.9
84256 sec
MOXA:~#
MOXA:~# hwclock -w
MOXA:~# date ; hwclock
Thu Dec 9 10:59:11 CST 2004
Thu Dec 9 10:59:12 2004 -0.844076 seconds
MOXA:~#

Содержание

Похожие устройства

Скачать