Skip to content
Home » AIX » How to Change Date Time in AIX

How to Change Date Time in AIX

Sometimes, the system clock may deviate from the standard time, we should make it back.

Solutions

Possible ways to solve the problem would be:

  1. ntpdate command
  2. smitty interface
  3. date command

1. NTP

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[15663506]: 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
AIX - smitty date
AIX - 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. Be aware of that!

Leave a Reply

Your email address will not be published. Required fields are marked *