Sometimes, the system clock may deviate from the standard time, we should make it back.
Possible ways to solve the problem would be:
The fastest way to adjust the date time is to synchronize with NTP servers. Here we use ntpdate to get the correct time back.
# ntpdate 10.10.10.100
10 Nov 19:07:48 ntpdate: step time server 10.10.10.100 offset -50424.507176
2. smitty UI
Through smitty date command, we can change the date time into the current time on the user interface.
# smitty date
The good thing is, we can only focus what are the correct values of present date time.
3. date Command
You have to know the correct format of date time to make the command execute. The acceptable format contains 10 digit. For example, we set a date time like the following.
# date 0928195220
Mon Sep 28 19:52:41 CST 2020
Every 2 digits represents a different variable.
- 1-2 digit: Month.
- 3-4 digit: Day of Month.
- 5-6 digit: Hour of Day.
- 7-8 digit: Minute of Hour.
- 9-10 digit: Year.
In the above command, the best precision can only be the minute, not the second. So second won't be set to zero.