Your PC stores the time in a hardware clock on its motherboard. The clock keeps track of time, even when the computer is off. By default, Windows assumes the time is stored in local time, while Linux assumes the time is stored in UTC time and applies an offset. This leads to one of your operating systems showing the wrong time in a dual boot situation.
To fix this, you have two options: Disable RTC in Linux, or make Windows use UTC time. Don’t follow both steps of instructions or they still won’t be speaking the same language! We recommend you make Linux use local time, if possible.
1. Disable RTC on Linux
timedatectl set-local-rtc 1 --adjust-system-clock
2. Use UTC in windows
Some times we might wrong time on servers or on your machine. On machines cmos battery is helpful to keep system time update to date even machine is not running. If this is not working or for some reason we might get wrong time on machines some times. To make sure servers time is update it is recommended to configure your system with NTP servers to sync server time.
NTP is the protocol which is used to sync system time. which stands for Network Time protocol. System will sync time form any one of the NTP server available using this protocol
We use the program ntp on linux to sync time from NTP servers. If you don’t this thing already installed, install using following instructions.
sudo apt-get install ntp
apt-get install ntpdate
CentOS or Redhat
sudo yum install ntp
Once this program is installed, you will get /etc/ntp.conf file. This file can be edited to configure ntp. You can place your desired NTP server in this file to sync time from that server. List of NTP servers can be found at NTP Servers
After you install package ntp you will get several commands including ntpd deamon. This daemon will run in background to sync system time.
Start nptd deamon
Configure ntpd to run as startup
chkconfig ntpd on
Update time using ntpdate
If not already installed
Update system time