在 Ubuntu 14.04 vps 上,我的时区设置为 UTC/GMT。
root@Ubuntu:/# date
Fri Mar 11 13:36:56 GMT 2016
root@Ubuntu:/# cat /etc/timezone
Europe/London
root@Ubuntu:/# ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 Mar 11 13:20 /etc/localtime -> /usr/share/zoneinfo/Europe/London
Run Code Online (Sandbox Code Playgroud)
但是,我在 /var/log 中的日志文件都提前了 9 小时(韩国时间?)。例如
root@Ubuntu:/# tail -3 /var/log/auth.log.1
Mar 11 22:27:05 Ubuntu sshd[18170]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.99.249.89
Mar 11 22:27:07 Ubuntu sshd[18170]: Failed password for invalid user cstrike from 211.99.249.89 port 38066 ssh2
Mar 11 22:27:07 Ubuntu sshd[18170]: Connection closed by …Run Code Online (Sandbox Code Playgroud)