Reset Timezone on Linux Systems

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

Installing CentOS

 Create CentOS Bootable USB

 Install CentOS from Bootable USB

 Install CentOS by Deleting Existing Partition

Reset Timezone on Linux Systems

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

 GCC - C/C++ Compiler

 Conda - Environment and Package Manager

 Tools and Utilities

 References

 Full Version in PDF/EPUB