时间自动同步根本不起作用
Tofloor
poster avatar
owen19
deepin
2017-09-20 04:35
Author
本帖最后由 owen19 于 2017-9-20 20:58 编辑



时间不对的话有些网页都打不开。。 百度也打不开,bing倒是可以打开。 等很长时间,也没能自动更新电脑的时钟,每次都要手动设置时间。
Reply Favorite View the author
All Replies
1 / 2
To page
avatar
180******28
deepin
2017-09-20 05:30
#1
自动同步
Reply View the author
avatar
herdde
deepin
2017-09-20 15:06
#2
联网就行了
Reply View the author
avatar
owen19
deepin
2017-09-20 22:30
#3
本帖最后由 owen19 于 2017-9-20 20:59 编辑

我的设置是跟你一样的,也开了自动同步,也连上网了,但是时间就是错的,等半天也没自动调对,所以才在这里发帖求问的。
可以的话帮我做个试验呗? 把你们自己电脑的时间改成一个错的时间,然后重启电脑看会不会自动同步上----- 我电脑每次开机时间都是错的,因为电池坏掉了没有装电池。。
Reply View the author
Comments
sachic
2017-09-21 05:32
自己曾经在没网络的时候修改过时间(不准),后来重启了一次(联网),打开自动同步好像就好了。
avatar
owen19
deepin
2017-09-21 05:10
#4
https://bbs.deepin.org/user/48640  请个人来帮忙解答下吧,帖子都快沉底了    虽然电脑电池没电的情况少见,但是deepin的“时间自动同步”功能目前若真是个摆设,至少回个话讲明已经知晓而且将来会改正吧
Reply View the author
avatar
duanyao
deepin
2017-09-21 06:53
#5
看一下日志吧,我这里重启,在BIOS里把时间往后调,再进 deepin,是可以自动同步的,日志像这样:

$ sudo journalctl -b -a | grep timesyncd
9月 11 20:00:24 duanyao-laptop systemd-timesyncd[800]: System clock time unset or jumped backwards, restoring from recorded timestamp: Wed 2017-09-20 22:37:11 CST
9月 20 22:41:37 duanyao-laptop systemd-timesyncd[800]: Synchronized to time server 85.199.214.101:123 (2.debian.pool.ntp.org).
Reply View the author
avatar
jingle
deepin
2017-09-22 00:15
#6
https://bbs.deepin.org/post/145756
@jingle  请个人来帮忙解答下吧,帖子都快沉底了    虽然电脑电池没电的情况少见,但是deepin的“时间 ...

自动同步功能有用啊
关闭后,设置到17点 然后开启自动到16点了。 你录屏看看吧
Reply View the author
avatar
owen19
deepin
2017-09-22 05:58
#7
https://bbs.deepin.org/post/145756
自动同步功能有用啊
关闭后,设置到17点 然后开启自动到16点了。 你录屏看看吧
...

算了,估计是我RP问题,录屏也不好使,开始录制后想停止,去点通知栏,发现它没反应。
改变时间设置,发现命令行看log也是空的。。



Reply View the author
avatar
duanyao
deepin
2017-09-22 07:49
#8
https://bbs.deepin.org/post/145756
算了,估计是我RP问题,录屏也不好使,开始录制后想停止,去点通知栏,发现它没反应。
改变时间设置,发现 ...

怪了,像是这个服务没有工作。你再执行下 timedatectl 和 systemctl status systemd-timesyncd 这两个命令。正常的输出像这样:

$ timedatectl
      Local time: 四 2017-09-21 23:46:25 CST
  Universal time: 四 2017-09-21 15:46:25 UTC
        RTC time: 四 2017-09-21 15:46:25
       Time zone: Asia/Shanghai (CST, +0800)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: active (running) since Wed 2017-09-20 23:42:03 CST; 24h ago
     Docs: man:systemd-timesyncd.service(8)
Main PID: 743 (systemd-timesyn)
   Status: "Idle."
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
           └─743 /lib/systemd/systemd-timesyncd
Reply View the author
avatar
owen19
deepin
2017-09-23 05:00
#9
https://bbs.deepin.org/post/145756
怪了,像是这个服务没有工作。你再执行下 timedatectl 和 systemctl status systemd-timesyncd 这两个命 ...

owen@owen-PC:~/Documents$ timedatectl
      Local time: 五 2017-09-22 20:58:15 CST
  Universal time: 五 2017-09-22 12:58:15 UTC
        RTC time: 五 2017-09-22 20:58:15
       Time zone: Asia/Shanghai (CST, +0800)
Network time on: yes
NTP synchronized: no
RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode can not be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.
owen@owen-PC:~/Documents$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
Condition: start condition failed at Fri 2017-09-22 20:56:25 CST; 1min 52s ago
           └─ ConditionFileIsExecutable=!/usr/sbin/VBoxService was not met
     Docs: man:systemd-timesyncd.service(8)


我的看起来果然是有异常,还请大侠再支个招~
Reply View the author
avatar
owen19
deepin
2017-09-23 05:03
#10
owen@owen-PC:~/Documents$ ls -l /usr/sbin/VBoxService
-rwxr-xr-x 1 root root 994432 3月  16  2017 /usr/sbin/VBoxService

也不是不能被执行啊
Reply View the author
avatar
sysop
deepin
2017-09-23 05:40
#11
我系统时间是对的
这个网站三天两头打不开。。。 别的网站没问题
是因为UTC吗?

Reply View the author
avatar
owen19
deepin
2017-09-23 05:47
#12
https://bbs.deepin.org/post/145756
我系统时间是对的
这个网站三天两头打不开。。。 别的网站没问题
是因为UTC吗?

你看看2#楼的配置吧,时区要是上海的,然后时间如果不对,我这里手动改对后还是能打开网页的
Reply View the author
avatar
duanyao
deepin
2017-09-23 08:14
#13
本帖最后由 duanyao 于 2017-9-23 00:48 编辑
https://bbs.deepin.org/post/145756
owen@owen-PC:~/Documents$ timedatectl
      Local time: 五 2017-09-22 20:58:15 CST
  Universal tim ...

“ConditionFileIsExecutable=!/usr/sbin/VBoxService was not met”的意思是 /usr/sbin/VBoxService 与 systemd-timesyncd 是冲突的,如果前者存在,后者就不会工作(参考: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812522 )。VBoxService 应该是 virtualbox-guest-utils 的一部分,只有装在 virtualbox 虚拟机里的系统需要这个东西。你是在虚拟机里装的 deepin?如果不是,卸掉 virtualbox-guest-utils 应该就行了。

另外,你最好根据上面的提示,把硬件时钟模式改为 UTC:
  timedatectl set-local-rtc 0

如果机器上还装着 Windows,也要把它改为 UTC 模式: http://mtoou.info/window-sutc-time/
Reply View the author
avatar
duanyao
deepin
2017-09-23 08:25
#14
https://bbs.deepin.org/post/145756
我系统时间是对的
这个网站三天两头打不开。。。 别的网站没问题
是因为UTC吗?

执行一下 timedatectl 看看。
Reply View the author
avatar
win7
deepin
2017-09-23 08:32
#15
其实可以自己配置 ntp 服务,网上 百度 一下,很多的。
Reply View the author
avatar
duanyao
deepin
2017-09-23 08:51
#16
https://bbs.deepin.org/post/145756
其实可以自己配置 ntp 服务,网上 百度 一下,很多的。

没必要,deepin 的 ntp 功能是默认已经配好的,普通用户不要自找麻烦。
Reply View the author
avatar
win7
deepin
2017-09-23 09:01
#17
我在这里说一下, ntp 是渐进式时间同步,如果和 ntp 服务器时间差异太大,时间只会越来越接近,而不是立刻同步成 ntp 服务器的时间。

如果要立刻同步时间,可以使用 ntpdate。
Reply View the author
avatar
owen19
deepin
2017-09-23 16:38
#18
https://bbs.deepin.org/post/145756
“ConditionFileIsExecutable=!/usr/sbin/VBoxService was not met”的意思是 /usr/sbin/VBoxService 与 s ...

我是在deepin上用VBOX安装了windows, 这个卸载掉会不会影响到虚拟机中的windows的正常使用?
Reply View the author
avatar
duanyao
deepin
2017-09-23 16:49
#19
https://bbs.deepin.org/post/145756
我是在deepin上用VBOX安装了windows, 这个卸载掉会不会影响到虚拟机中的windows的正常使用? ...

不会,前面说了,只有装在 virtualbox 虚拟机里的系统需要这个东西。你的 windows 是 guest,应该装 guest addition (http://docs.oracle.com/cd/E26217 ... uest-additions.html)。
Reply View the author
avatar
sysop
deepin
2017-09-23 20:42
#20
https://bbs.deepin.org/post/145756
执行一下 timedatectl 看看。


Reply View the author
1 / 2
To page