How to change your CentOS server timezone

Timezone data (tzdata) is stored in /usr/share/zoneinfo.

To change your CentOS server’s timezone, simply run the following command based up on the examples below:

Example 1: set time zone to Melbourne, Australia
cp /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
Example 2: set time zone to UTC
cp /usr/share/zoneinfo/UTC /etc/localtime

To confirm the time set on your system, run the date command, example:

date
Thu Jul 26 09:53:11 EST 2012

If you want to sync this time to your hardware (BIOS) clock, run the following command:

hwclock --systohc
Scan to Donate Bitcoin
Like this? Donate Bitcoin to at:
Bitcoin 13KzxfEoFPzt5ccoQvSkUEytTgQV8JN5ej
Donate
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the author of CentOS Blog. Please feel free to comment with any suggestions, feedback or questions!

  • Geschwint

    Great, works on CentOS 7 also. Thanks

  • Work Perfect…
    Thaks so much!