• centosblog_icon_b_64

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 14M4a7UHEX61VoHkyjj4dxbUBNGGz3hmhM
Donate
Share This Post

About Author: Curtis K

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

  • Geschwint

    Great, works on CentOS 7 also. Thanks

  • Work Perfect…
    Thaks so much!