Ubuntu Server & NTP
Sync time on your Ubuntu Server with NTP (Network Time Protocol)
When dealing with daylight savings time one has to deal with the problem of time difference going +/-X hours awry between the actual time and time on the server. The problem gets worst if your server is handling time critical business transactions.
So here is a simple solution. Write a small script to sync time with a NTP server of your choice and schedule the script through crontab.
Create a file with any editor of your choice and paste the following script and save it to any directory e.g ~/useful_scripts/.
#!/bin/sh
ntpdate ntp.lth.se
Don’t forget to make the script executable and then schedule it to run periodically through crontab. Here I am using one of the nearest ntp servers so you should change it according to your location. The closer the better it is.
It will save you from a lot of headaches of dealing with customers complaining about time related problems the very next morning of clock shift for DST which happen every year twice.
Email me when Nauman Badar publishes or recommends stories