Linux – Configure time zone and daylight savings

Linux – Configure time zone and daylight savings

So, you setup your new Linux distribution and used all the default setting during the install.
but now, you realized that you are on different time zone or you want to check if the DST change will occur on the right dates.

here is a simple and solid solution that set your system time zone.
Check system DST Database

shows when the system is configured to change the next DST: on the time zone “US/Eastern”

/usr/sbin/zdump -v US/Eastern | grep 2015

Not sure how to type your specific time zone? (Folder/file)

find your Time zone location

ls /usr/share/zoneinfo/
cd yourDesiredTimeZone
Configure time zone to Eastern time and allow time zone change automatically.

this removes the current localtime file

 rm /etc/localtime

creates a link to the correct time zone file

  ln -s /usr/share/zoneinfo/US/Eastern localtime 



with this approach when the DST tables are updated (there are some countries where it changes frequently) your system will be updated too.


About the Author
Danny Wiener

Technologist, The key to solve things is to be able to explain what you have done in 5 sentences.

© 2020