0

We have 16 Linux RHEL 7.5 servers in a cluster and servers are sync with crony service to NTP server

We have two questions

  1. How to know if DST is configured on our servers?

  2. How to disable the DST on our Redhat Enterprise Linux 7 servers?

1

1 Answer 1

6

You don't disable DST per se, you set the desired time zone, and you get DST if the time zone has DST.

You can check the configured time zone with timedatectl.

If your timezone has DST you'll see something like this:

[root@stonard ~]# timedatectl 
      Local time: Sat 2020-06-20 18:27:30 EDT
  Universal time: Sat 2020-06-20 22:27:30 UTC
        RTC time: Sat 2020-06-20 22:27:30
       Time zone: America/New_York (EDT, -0400)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2020-03-08 01:59:59 EST
                  Sun 2020-03-08 03:00:00 EDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2020-11-01 01:59:59 EDT
                  Sun 2020-11-01 01:00:00 EST

Otherwise you'll see something like this:

[root@farshire ~]# timedatectl 
      Local time: Sat 2020-06-20 22:26:50 GMT
  Universal time: Sat 2020-06-20 22:26:50 UTC
        RTC time: Sat 2020-06-20 22:26:50
       Time zone: Etc/GMT (GMT, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

To change the time zone, use timedatectl set-timezone ZONE, where ZONE is a valid zoneinfo zone. For example:

# timedatectl set-timezone Europe/Kiev
17
  • 3
    @KingDavid That information is provided by the relevant national governments to the zoneinfo maintainers. They then update the zoneinfo database, and you receive an update to the tzdata package which you can update with yum. Jun 20, 2020 at 22:34
  • 2
    @KingDavid If you did not update the tzdata package, then you might have wrong dates for daylight saving. Jun 20, 2020 at 22:37
  • 3
    @KingDavid No, you should keep the tzdata package up to date. Jun 20, 2020 at 22:44
  • 2
    You use DST when you need to work with times in a local time zone. If you have no need of this, just use UTC. Jun 20, 2020 at 22:45
  • 3
    If your application doesn't require the timezone to be set to local time, then you can just use UTC like most servers, and forget about DST. If your application does require the timezone to be set to local time, then you should make arrangements to update tzdata whenever an update affecting your time zone(s) appears. Jun 20, 2020 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .