Upon a successful login into the VM system, changing the Timezone to which the system’s time is configured can be accomplished by changing the /etc/localtime link.

Since the implementation of systemd in RHEL7, changing the system’s default
timezone manually is not persistent; as the /etc/localtime link gets recreated
by systemd after a reboot, the user must use timedatectl to make the desired
change persistent

To change the default timezone to the timezone of Chicago, for example, execute the following as the root user:

#  cd /etc/
#  ls -alh localtime
/etc/localtime -> ../usr/share/zoneinfo/America/NewYork
#  unlink /etc/localtime
#  ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
/etc/localtime -> ../usr/share/zoneinfo/America/Chicago

In the above example, we have changed the timezone from the previous value, pointing to the timezone to which “NewYork” belongs, to the timezone of Chicago.

The systemd Method for Changing the Default Timezone


      timedatectl [OPTIONS...] {COMMAND}


      timedatectl may be used to query and change the system clock and its settings.

      Use systemd-firstboot(1) to initialize the system time zone for mounted (but not booted) system images.
timedatectl list-timezone

Shows all the available “timezones” in the form of Continent/City.

timedatectl set-timezone America/Chicago

Changes the system’s clock to follow the timezone of the city of Chicago.

Popular posts from this blog

Configure rsyslog Server on Fedora

RHEL 7 and CentOS 7 syslog Rate Limit

EFF Announces Voting Registration Service