IBM Support

System time is incorrect

Troubleshooting


Problem

The system time is incorrect and I need to know how to reset it.

Resolving The Problem

This example will use a system located in the Central Time Zone.

1. The first thing to change is the system time by using the date command.  The syntax is as follows:
date MMDDHHMMYYYY

2. Determine whether the hardware clock (in BIOS) and the system clock are in agreement. Use the hwclock --show command to check the hardware clock time and use the date command to get the system time.

The output below shows a discrepancy; the system time is the correct one. 


[root@npshost ~]# hwclock --show
Wed 13 Feb 2008 05:13:45 PM GMT -0.145054 seconds


[root@npshost ~]# 
date
Wed Feb 13 16:14:22 GMT 2008



3. Set the hardware clock to match the system time by using the hwclock --systohc --utc command as shown below. The --utc flag is also added because keeping the time in UTC allows linux to automatically account for daylight savings.

[root@npshost ~]# hwclock --systohc --utc 
[root@npshost ~]# hwclock --show
Wed 13 Feb 2008 04:15:52 PM GMT -0.039525 seconds


4. Now that the hardware and system clocks are in agreement, look at the clock configuration settings. On a Red Hat Linux system, run the cat /etc/sysconfig/clock command to see the current settings.


[nz@npshost ~]$ cat /etc/sysconfig/clock
ZONE="America/New_York"
UTC=false
ARC=false


There are two problems: "America/New_York" is wrong and UTC should be set to "true".

5. In a text editor, open the /etc/sysconfig/clock file and modify it so that it looks like this:

----------------------------------------------------------------------
ZONE="America/Chicago"
UTC=true
ARC=false

----------------------------------------------------------------------

6. Save the /etc/sysconfig/clock file.

7. You have to restart NPS so the database recognizes the correct system time.
nzsystem restart -force

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ087544

Document Information

Modified date:
17 October 2019

UID

swg21572933