MacBook pro 自动设置日期与时间,与当前时间不符

MacBook pro 自动设置日期与时间,一直从2021-4-29开始,而不是当前最新的时间

MacBook Pro 15″, macOS 11.2

发布日期 2021年5月25日 上午3:21

回复
问题被标记为 排名最靠前的回复

发布日期 2021年5月31日 下午9:40

根据前面 @SparkWu 和 @Sariel 与你互动的结果

如果使用的是正确的 time.apple.com 作为时间同步服务器的话,最后那个输出的 1622512384.239782,转化为本地时间是:

% TZ=UTC8 date -r 1622512384
Mon May 31 17:53:04 UTC 2021


时间看上去应该是对的。



所以,还是其他的设置问题.

要想解决,可能有点麻烦,下面分两部分脚本,各有用途,下面解释:

1> 下面的是显示当前的时间、时区、时间服务器和软硬件的信息:

date; sudo systemsetup -gettimezone; sudo systemsetup -getusingnetworktime; sudo systemsetup -getnetworktimeserver; sw_vers; system_profiler SPHardwareDataType | grep -v "Serial Number\|Hardware UUID"


2> 下面这个,设置时区为“Shanghai”、使用时间服务器time.apple.com和打开网络时间同步。为了方便,这是一行命令。注意,比较长,复制完全:

sudo systemsetup -setusingnetworktime off; sleep 3; sudo systemsetup -settimezone "Asia/Shanghai"; sudo systemsetup -setnetworktimeserver "time.apple.com."; sudo systemsetup -setusingnetworktime on; sntp time.apple.com; date


注:如果提示密码,请输入当前管理员密码,输入时光标不会随着输入移动,输入正确完成后,按 enter 确认并继续。


按理说,运行命令设置完后,时间就应该回归正常了。

如果还不行,到“时区”标签页中,不选择“自动设定时区”,如下图,然后在运行上面2>的命令一次:


如果还有问题,把两组命令的输出截屏上来看看。


另外,也请 @SparkWu 和 @Sariel 说说有什么其它的途径。

回复量: 30

2021年6月1日 下午11:11 回应 tonyfromcalgary

还是不行,执行后的结果如下


DreamworlddeMacBook-Pro:~ dreamworld$ date; sudo systemsetup -gettimezone; sudo systemsetup -getusingnetworktime; sudo systemsetup -getnetworktimeserver; sw_vers; system_profiler SPHardwareDataType | grep -v "Serial Number\|Hardware UUID"


2021年 5月 7日 星期五 06时58分58秒 CST


Password:


Time Zone: Asia/Shanghai


Network Time: On


Network Time Server: time.apple.com.


ProductName: macOS


ProductVersion: 11.2.1


BuildVersion: 20D74


Hardware:




    Hardware Overview:




      Model Name: MacBook Pro


      Model Identifier: MacBookPro14,3


      Processor Name: Quad-Core Intel Core i7


      Processor Speed: 2.8 GHz


      Number of Processors: 1


      Total Number of Cores: 4


      L2 Cache (per Core): 256 KB


      L3 Cache: 6 MB


      Hyper-Threading Technology: Enabled


      Memory: 16 GB


      System Firmware Version: 429.80.1.0.0


      SMC Version (system): 2.45f5


      Provisioning UDID: ********-****-****-****-************




DreamworlddeMacBook-Pro:~ dreamworld$ sudo -- sh -c 'systemsetup -setusingnetworktime off; touch /var/db/ntp-kod; sntp -Ss time.apple.com; printf "Current Date&Time(NTS=Off): %s\n" "$(date)"; sleep 3; systemsetup -settimezone "Asia/Shanghai"; systemsetup -setnetworktimeserver "time.apple.com"; systemsetup -setusingnetworktime on; printf "Current Date&Time(NTS=On): %s\n" "$(date)"'


setUsingNetworkTime: Off


sntp: Exchange failed: Timeout


sntp: Exchange failed: Timeout


sntp: Exchange failed: Timeout


sntp: Exchange failed: Timeout


+2271261.119139 +/- 0.000351 time.apple.com 17.253.114.253


Current Date&Time(NTS=Off): 2021年 5月 7日 星期五 06时59分24秒 CST


Set TimeZone: Asia/Shanghai


setNetworkTimeServer: time.apple.com


setUsingNetworkTime: On


Current Date&Time(NTS=On): 2021年 5月 7日 星期五 06时59分27秒 CST


[个人信息经过版主编辑]

这个主题已被系统或社区团队关闭。 你可以为你认为有帮助的任何帖子投票,也可以在社区中搜索其他答案。

MacBook pro 自动设置日期与时间,与当前时间不符

欢迎来到 Apple 支持社区
Apple 客户在其产品方面互相帮助的论坛。使用您的 Apple 帐户开始畅游其中吧!!