How do i control the time and data in redhat 7?
-
Redhat 7 has the timedatectl command, to manage time and date settings.
Display the settings.
$ timedatectl Local time: Thu 2016-05-12 09:42:12 EDT Universal time: Thu 2016-05-12 13:42:12 UTC RTC time: Thu 2016-05-12 13:42:12 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 2016-03-13 01:59:59 EST Sun 2016-03-13 03:00:00 EDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2016-11-06 01:59:59 EDT Sun 2016-11-06 01:00:00 EST
List the timezones.
$ timedatectl list-timezones
To change the setting for timezone to Chicago.
$ timedatectl set-timezone America/Chicago
To verify
$ date $ ls -l /etc/locatime
© Lightnetics 2024