lab@ubuntu:~$ date
Fri Apr 8 01:24:38 CDT 2016 ##这是当前时间
lab@ubuntu:~$ ls /etc/localtime -l
lrwxrwxrwx 1 root root 35 Apr 8 01:24 /etc/localtime -> /usr/share/zoneinfo/America/Chicago ##当前时区Chicago
lab@ubuntu:~$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ##修改时区为Shanghai
[sudo] password for lab:
lab@ubuntu:~$ ls /etc/localtime -l
lrwxrwxrwx 1 root root 35 Apr 8 14:24 /etc/localtime -> /usr/share/zoneinfo/America/Chicago ##时区未改变
lab@ubuntu:~$ date
Fri Apr 8 14:25:59 CST 2016 ##时间改变了
附件有图,时间改过来了,但是/etc/localtime没有改过来,桌面的右上角的时间及时区也没有改过来。请问为什么
修改时区失败,求大神帮助
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 2
- 注册时间: 2016-04-08 14:15
- 系统: windows
- vickycq
- 帖子: 4507
- 注册时间: 2011-03-20 13:12
- 系统: Debian
- 来自: 山东省寿光县
- 联系:
Re: 修改时区失败,求大神帮助
/etc/localtime 必须是符号链接,所以不能用 cp,需要用 ln -sfsaltyfish 写了: lab@ubuntu:~$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ##修改时区为Shanghai
[请问为什么
参考 https://www.freedesktop.org/software/sy ... ltime.htmlBecause the timezone identifier is extracted from the symlink target name of /etc/localtime, this file may not be a normal file or hardlink.
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
欢迎所有 Debian GNU/Linux 用户
-
- 帖子: 2
- 注册时间: 2016-04-08 14:15
- 系统: windows
Re: 修改时区失败,求大神帮助
vickycq 写了:/etc/localtime 必须是符号链接,所以不能用 cp,需要用 ln -sfsaltyfish 写了: lab@ubuntu:~$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ##修改时区为Shanghai
[请问为什么参考 https://www.freedesktop.org/software/sy ... ltime.htmlBecause the timezone identifier is extracted from the symlink target name of /etc/localtime, this file may not be a normal file or hardlink.
感谢!链接改过来了,但是桌面右上角的时间没有改变。
- vickycq
- 帖子: 4507
- 注册时间: 2011-03-20 13:12
- 系统: Debian
- 来自: 山东省寿光县
- 联系:
Re: 修改时区失败,求大神帮助
执行 date 看看时间是否正确saltyfish 写了:链接改过来了,但是桌面右上角的时间没有改变。
若系统为 15.10,执行 timedatectl 将输出全部复制贴上来
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
欢迎所有 Debian GNU/Linux 用户