Walker News

How To Check If My Linux Server Has The Right DST Changeover Date?

It’s not uncommon that some countries update DST changeover date from time to time. So, how to tell or know if the Red Hat Enterprise Linux server can handle the daylight saving time (DST) changeover date accordingly?

For RHEL/CentOS admins, you can run zdump command to verify the DST changeover date. For example, to query the DST changeover dates of 2013/2014:
zdump -v /etc/localtime | egrep "2013|2014"

Using zdump to query DST changeover date on RHEL

If it is not correct, then check if you’ve installed the latest tzdata update:
rpm -qa | grep tzdata

Suppose the YUM is configured properly to download software updates from RHEL/CentOS repositories (or any public, trustable sources), just try to update the tzdata package:
yum update tzdata

After installing the latest update of tzdata, run setup and select “Timezone configuration” (or just run system-config-date) to confirm the right time zone is used.

Next, verify again if the /etc/localtime has updated accordingly. If it is not, you can manually overwrite the /etc/localtime with the correct time zone file installed by tzdata package. In this example, it’s replaced by New_York time zone file (EST) and then rerun zdump:
cp /usr/share/zoneinfo/America/New_York /etc/localtime

zdump -v /etc/localtime | egrep "2013|2014"

Custom Search

2018  •  Privacy Policy