ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Changing the Time Zone on Linux

    IT Discussion
    red hat rhel centos linux timezone tzdata
    1
    1
    698
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Every so often one must change the time zone setting on a Linux machine. This change is far from intuitive but is pretty simple to do today.

      This is a two step process. First we modify one file and then we symlink a second file.

      The first file to alter is /etc/sysconfig/clock. There is a directive in this file called ZONE. Zone will equal the name of the time zone that you want to select. Options include things like “America/New_York”, “GMT” or “UTC”. The list of all available time zone options can be viewed in the directory /usr/share/zoneinfo/.

      Once your clock setting is correct all we need to do is to symlink the correct timezone file, the same one that you just selected above, to be pointed to by the /etc/localtime symlink. If moving to UTC, for example, you would use this command:

      ln -sf /usr/share/zoneinfo/UTC /etc/localtime
      

      You can check that the timezone has changed with the date command.

      Reference: Red Hat Manual on Time Zones

      1 Reply Last reply Reply Quote 1
      • 1 / 1
      • First post
        Last post