Overview
At times, you may need to change the date, time, and time zone on the Management Server. Please note that these changes may affect the database and traffic graphs.
Process
- Connect to the PAD server via SSH.
- Switch to the root user.
- It is recommended to stop the service before making any changes.
oper service stop
- Set the corresponding date on the operating system (in the yyyymmdd format):
date +%Y%m%d -s "yyyymmdd"
- Set the corresponding time (in the hh:mm:ss format):
date +%T -s "hh:mm:ss"
- Run the following command to set the desired time zone:
cp /usr/share/zoneinfo/<Region>/<City> /etc/localtime
For example, if you want to set the time zone to IST, the command will be:cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
You can navigate to thezoneinfo
directory and check the available regions and cities by running the following commands:cd /usr/share/zoneinfo
ll
Note: Please make a backup of the existing time zone file before replacing it. - Synchronize the OS time with the hardware clock:
hwclock --systohc
- If you stopped the service in step 2, start it again:
oper service start
Confirmation
- Run the
date
command to check if the OS time was updated. - Run the
hwclock --show
command to check if the hardware clock is synchronized with the OS time.