Reset Timezone on Linux Systems

This section provides a tutorial example on how to view and change timezone settings on Linux systems using the 'timedatectl' command.

After installing a new Linux system, you want to check and reset its timezone to match the local time.

1. View the current timezone using the "timedatectl" command.

herong$ timedatectl

               Local time: Sat 2020-10-10 04:16:49 EST
           Universal time: Sat 2020-10-10 09:16:49 UTC
                 RTC time: Sat 2020-10-10 05:16:49
                Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.

2. Reset timezone to Paris:

herong$ timedatectl list-timezones | grep Paris
Europe/Paris

herong$ sudo timedatectl set-timezone Europe/Paris

3. Reset the RTC (Real Time Clock) in UTC (Coordinated Universal Time). As shown in the above warning message, setting RTC in local timezone may cause problems.

herong$ sudo timedatectl set-local-rtc 0

herong$ timedatectl
                 Local time: Sat 2020-10-09 10:16:49 CET
             Universal time: Sat 2020-10-10 09:16:49 UTC
                   RTC time: Sat 2020-10-10 09:16:49

                  Time zone: Europe/Paris (CET, +0100)
  System clock synchronized: yes
                NTP service: active
            RTC in local TZ: no

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

Installing CentOS

 Create CentOS Bootable USB

 Install CentOS from Bootable USB

 Install CentOS by Deleting Existing Partition

Reset Timezone on Linux Systems

 Reset Host Name on Linux Systems

 Update All Installed Packages

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Software Package Manager on CentOS - DNF and YUM

 vsftpd - Very Secure FTP Daemon

 LDAP (Lightweight Directory Access Protocol)

 Administrative Tasks

 References

 Full Version in PDF/EPUB