全球主机交流论坛

标题: 技术大佬来科普下“linear script to set the time” [打印本页]

作者: moowee    时间: 2018-12-6 18:38
标题: 技术大佬来科普下“linear script to set the time”
本帖最后由 moowee 于 2018-12-6 18:43 编辑

My vps time is inconsistent with the Internet time.

I last synchronized the time with ntpdate, and today I found that the time has become wrong again.

I don't know, when will time become wrong again. It affects my use and hopes to help me fix it.

Can you help me solve the problem of wrong time?

thank you very much.

This is the wrong information below:

[root@~]# date
Thu Dec 6 13:05:27 CST 2018
[root@~]# hwclock
Thu 06 Dec 2018 01:05:55 PM CST -0.622322 seconds
[root@~]# ntpdate -u time.nist.gov
6 Dec 12:48:03 ntpdate[1471]: step time server 2610:20:6f96:96::4 offset -1340.142710 sec
[root@~]# date
Thu Dec 6 12:48:33 CST 2018

机器翻译发的TK,客服这样回复的,不太懂:



Hello,

Thanks for your patience.

We are using a linear script to set the time, Please use the below script to update or sync the time.

date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"

Thanks and Regards,
Augustine Tom
ChangeIP.com


作者: ojoehao    时间: 2018-12-6 18:40
时间校准命令
作者: moowee    时间: 2018-12-6 18:41
ojoehao 发表于 2018-12-6 18:40
时间校准命令


为啥用ntpdate不行,要用他的linear script ?

他这个就能解决问题,不复发?
作者: ojoehao    时间: 2018-12-6 18:46
moowee 发表于 2018-12-6 18:41
为啥用ntpdate不行,要用他的linear script ?

他这个就能解决问题,不复发? ...

不复发




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4