Thursday, 11 September 2025

How can you configure the Linux Server to use the 'Asia/Kolkata' timezone

 

Using Red Hat Enterprise Linux 9 (RHEL 9), how can you configure the system to use the 'Asia/Kolkata' timezone?


"In RHEL 9, set the timezone to 'Asia/Kolkata' using timedatectl. First, find the timezone with timedatectl list-timezones | grep Asia/Kolkata. Then, execute sudo timedatectl set-timezone Asia/Kolkata. This updates the system's timezone, taking effect immediately and persisting after reboots. timedatectl replaces older commands, offering a straightforward method for time management in Linux environments."


[root@DockerServer ~]# timedatectl
               Local time: Thu 2025-09-11 06:05:30 EDT
           Universal time: Thu 2025-09-11 10:05:30 UTC
                 RTC time: Thu 2025-09-11 10:05:30
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

[root@DockerServer ~]# timedatectl list-timezones | grep -i Asia/Kolkata
Asia/Kolkata

[root@DockerServer ~]# date
Thu Sep 11 06:06:00 EDT 2025

[root@DockerServer ~]# timedatectl set-timezone Asia/Kolkata
[root@DockerServer ~]#
[root@DockerServer ~]#

[root@DockerServer ~]# timedatectl
               Local time: Thu 2025-09-11 15:36:37 IST
           Universal time: Thu 2025-09-11 10:06:37 UTC
                 RTC time: Thu 2025-09-11 10:06:36
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

[root@DockerServer ~]# date
Thu Sep 11 15:36:47 IST 2025
[root@DockerServer ~]#




No comments:

Post a Comment