date time zone

General support questions
Post Reply
good_face
Posts: 21
Joined: 2019/10/15 13:29:09

date time zone

Post by good_face » 2020/02/05 08:27:01

I cannot change the time zone from eet to istanbul.

also timedatectl does not work. why can there be such a problem.


[root@best01 ~]# date
Wed Feb 5 10:32:55 EET 2020
[root@best01 ~]# cat /etc/re
readahead.conf redhat-release resolv.conf
redhat-access-insights/ request-key.conf
redhat-lsb/ request-key.d/
[root@best01 ~]# cat /etc/re
readahead.conf redhat-release resolv.conf
redhat-access-insights/ request-key.conf
redhat-lsb/ request-key.d/
[root@best01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
[root@best01 ~]# clear
[root@best01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
[root@best01 ~]# date
Wed Feb 5 10:46:46 EET 2020
[root@best01 ~]# time
time timeout times
[root@best01 ~]# time
time timeout times
[root@best01 ~]# clear
[root@best01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
[root@best01 ~]# date
Wed Feb 5 10:47:07 EET 2020
[root@best01 ~]# timedatectl
-bash: timedatectl: command not found
[root@best01 ~]# vi /etc/ntp.conf

[root@best01 ~]# date
Wed Feb 5 10:48:25 EET 2020
[root@best01 ~]# date
Wed Feb 5 10:48:31 EET 2020
[root@best01 ~]# ln -s /usr/share/zoneinfo/E
EET Egypt Eire EST EST5EDT Etc/ Europe/
[root@best01 ~]# ln -s /usr/share/zoneinfo/Europe/Is
Isle_of_Man Istanbul
[root@best01 ~]# ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
ln: creating symbolic link `/etc/localtime': File exists
[root@best01 ~]# date
Wed Feb 5 10:49:48 EET 2020
[root@best01 ~]# time
time timeout times
[root@best01 ~]# timedatectl
-bash: timedatectl: command not found
[root@best01 ~]#

User avatar
TrevorH
Forum Moderator
Posts: 27727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: date time zone

Post by TrevorH » 2020/02/05 13:34:23

This is a CentOS 6 system and that does not use systemd nor any of the systemd-related utilities like timedatectl (actually practically any *ctl utils will not exist).

You are also running a copy of CentOS 6 that is severely out of date. 6.7 is from 2015 so you are missing 5 years of security patches and enhancements. More relevant to the current problem is that you're missing 5 years worth of update to the tzdata* packages.

The current and only supported version of CentOS 6 is 6.10 which came out in mid-2018 and still receives security updates. Run yum update to get your system up to date.

On CentOS 6, you must adjust timezones manually. Do not symlink /etc/localtime to the file in /usr/share/zoneinfo that you want to use or the file will end up being corrupted. You must remove the symlink and cp the file from /usr/share/zoneinfo to /etc/localtime but before you do that, I recommend that you run rpm -Va tzdata\* to check if any of the zoneinfo files are already corrupt. If there is any output from the rpm -Va then you should yum reinstall tzdata\* to correct them (after making sure that /etc/localtime is not a symlink).

So, rm the symlink, cp the file, run rpm Va and reinstall if required. After the reinstall, recopy the file you want.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

good_face
Posts: 21
Joined: 2019/10/15 13:29:09

Re: date time zone

Post by good_face » 2020/02/06 07:52:49

I mean, if I update the system, it wouldn't be necessary to do it. Which version should I upgrade to? 6.7 or 6.9 or etc..
thanks

User avatar
TrevorH
Forum Moderator
Posts: 27727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: date time zone

Post by TrevorH » 2020/02/06 13:24:13

You need to do both things. You will need to fix the tzdata setup using the info I gave you before and you need to yum update to the latest which is 6.10 (10 being > 9).
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

good_face
Posts: 21
Joined: 2019/10/15 13:29:09

Re: date time zone

Post by good_face » 2020/02/18 19:31:28

Can I just install ntp services without installing tzdata or OS updating. I do not want to update or make any changes because a special application is running on the server . sorry so for asking weird questions !

also the server is not connected to the internet, is there a way how to install ntp service .
Also how i install tzdata for redhat 6.7 without internet connection.

Post Reply

Return to “CentOS 6 - General Support”