On This Page
Changing the Time and Date
This topic is intended for TOS Administrators. |
Overview
SecureTrack and SecureChange must maintain accurate date and time. If the host is not configured to self-synchronize automatically with an NTP server, you should periodically make sure that the date and time are correct. If the host does self-synchronize with an NTP server, the time zone still needs to be configured manually .
To change the time zone, see Changing the Time Zone.
Check the Current Date and Time Settings
- Log into the host as the root user.
-
Run:
date
The resulting output includes the date, time, time zone, and year. For example:
Wed Feb 24 13:20:04 CET 2021 ST
This means: Wednesday, February 24th 2021, 1:20PM, Central European Time zone.
- If anything needs to be changed, follow the relevant instructions below.
Change the Date or Time
-
To set the date or time, run the following command:
date --set "YYYY-MM-DD HH:MM:SS"
For example, to set to: February 24th, 2021, 14:00, run:
date --set "2021-02-24 14:00:00"
-
To set the hardware clock according to the software clock, run the following command:
/sbin/hwclock --systohc