0

I'm getting two different timezones on Linux (CENTOS 5.6) depending on whether date is called locally or via ssh:

foo$ ssh me@bar date
Tue Nov  5 18:08:32 EST 2013

foo$ ssh me@bar

bar$ date
Tue Nov  5 17:09:16 CST 2013

/etc/localtime is set to central time:

$ ls -l /etc/localtime 
lrwxrwxrwx 1 root root 27 Nov  5 13:10 /etc/localtime -> /usr/share/zoneinfo/CST6CDT

TZ is set to America/Chicago in .bash_profile. If that line is commented out, time zone comes back as eastern rather than central.

I'm assuming this all means the computer believes in its heart that it's on eastern rather than central time and the TZ setting in the shell just overrides this, but I can't figure out WHY the computer thinks it's in eastern time.

edit It turned out that a runaway process somewhere had actually overwritten the central time timezone file with an eastern time timezone file. Not easy to find, as the file contents are binary!

4

1 回答 1

0

你检查过 -> /etc/sysconfig/clock 吗?

于 2013-11-18T13:06:34.363 回答