Change the Timezone in CentOS

Blaine's picture
We have come across several times where it would be nice to change the timezone on the servers we are administering. Find out how you change timezone now.

A quick howto on changing the timezone in RHEL/CentOS/Fedora

We have come across several times where it would be nice to change the timezone on the servers we are administering. While you would think this would be straight forward, it's not as easy as you'd think. Usually, with a GUI you just set the timezone, and you're done. On a server, there's no GUI to check the timezone.

So how exactly do you change the timezone? This line of code changes your system timezone to "New York" or commonly known as "Eastern" time.
cp /usr/share/zoneinfo/America/New_York /etc/localtime

If you were thinking you want to use UTC, you'd do the following:
cp /usr/share/zoneinfo/UTC /etc/localtime

If you are looking for a different timezone, you can find them all:
ls /usr/share/zoneinfo | less

When you find the correct timezone, copy it over the localtime file. We also highly recommend keeping your time updated using NTP. To do so, run this:
yum install -y ntp ntpdate && chkconfig ntpdate on && service ntpdate start

This downloads the NTP service which will synchronize with time servers on the internet, sets the service to turn on at boot time, and starts the service.

Recent Posts

Video Marketing for Business: Here is what the experts are saying If you are an entrepreneur in this era, you... Read more
Brand Yourself for Web Marketing It's time to talk about the feature that will set you apart from your competition... Read more
Time to Make your Presence on the Web Felt: How Much you Should invest? You know what you want to... Read more

Need Support?

Every video, every website, every chatbot, every client - 100% custom products and solutions to make your business run successfully

145 Pine Haven Shores Road #1205 Shelburne, VT

Recent Tweets

  • PSA: Severe Vulnerability in All Wi-Fi Devices via 16 hours 52 min ago
  • This needs to end... Senseless violence all for what? 2 weeks 1 day ago
  • RT : My warmest condolences and sympathies to the victims and families of the terrible Las Vegas shooting. God bless you! 2 weeks 1 day ago
  • RT : Michelle & I are praying for the victims in Las Vegas. Our thoughts are with their families & everyone enduring another senseless tragedy. 2 weeks 1 day ago
  • RT : Las Vegas update: - At least 400 wounded taken to hospitals, per police - Gunman found dead in hotel room 2 weeks 1 day ago

Socialize with us


Go to top