Changing the Time and Date

SecureTrack and SecureChange must maintain accurate date and time. If the host is not configured to automatically self-synchronize 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 manually configured.

To change the time zone, see Changing the Time Zone.

To check the current date and time settings:

  1. Log into the host as the root user.
  2. 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.

  3. If anything needs to be changed, follow the relevant instructions below.

To change the date or time:

  1. Run:

    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"

  2. Set the hardware clock according to the software clock, by running:

    /sbin/hwclock --systohc