Weird CentOS server behavior time zones

The CST time zone is GMT -6, so if CST time is 15:47 then GMT time is 21:47.

If you are saying that at the time you took the screenshot the time was supposed to be 07:48 in the morning, then your server time is not correct, and you need to synchronise it.

Run this command to synchronise the time to correct one:

ntpdate -s time.nist.gov

It is possible you don't have ntp installed at all on your server, in which case you need to install it with:

yum install ntp ntpdate ntp-doc

And start the NTP service to keep the time synchronised with:

/etc/init.d/ntpd start

Also make sure to set the NTP service to autostart on boot with:

chkconfig ntpd on

I think the underlying problem is that "CST" is an ambiguous name for a timezone. It can stand for Central Standard Time, China Standard Time, and Cuba Standard Time.

[me@risby ~]$ export TZ=GMT ; date
Sat  7 Jan 09:21:31 GMT 2017
[me@risby ~]$ export TZ=US/Central ; date
Sat  7 Jan 03:21:31 CST 2017
[me@risby ~]$ export TZ=ROC ; date
Sat  7 Jan 17:21:31 CST 2017
[me@risby ~]$ export TZ=America/Havana ; date
Sat  7 Jan 04:21:31 CST 2017

(I'm aware that the ROC is not the PRC, but they keep the same time, and I can't immediately put my hand on an unambiguously PRC-specific timezone in my /usr/share/zoneinfo.)

So I suspect you're thinking that your system clock is in China Standard Time, and thus expecting GMT to be eight hours behind that (0748GMT), whereas my guess would be that it is in Central Standard Time, which puts GMT six hours ahead of that (2148GMT). The latter interpretation is consistent with what you've shown us.

So set your system timezone to what you want it to be, preferably using geographical timezones rather than abbreviation-based ones. If the system clock is then wrong, set it (preferably using NTP, which is all UTC-based and doesn't embed any of these problems, and which will keep the clock in sync going forward).


This looks ok to me. Dublin (UTC+0) is currently 6 hours ahead of CST (UTC-6). When you carried out the operation the CST time was 15:47. After the operation the time was 21:48. The time difference is correct.