首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >硬件时间与系统时间

硬件时间与系统时间
EN

Ask Ubuntu用户
提问于 2021-04-10 09:09:26
回答 1查看 89关注 0票数 0

我是卢本图的焦点。

硬件时间显示正确,但在我的桌面时钟是2小时后。

代码语言:javascript
复制
hwclock --verbose
hwclock from util-linux 2.34
System Time: 1618052149.196788
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1617960063 seconds after 1969
Last calibration done at 1617960063 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2021/04/10 10:55:51 #correct time
Hw clock time : 2021/04/10 10:55:51 = 1618052151 seconds since 1969
Time since last adjustment is 92088 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2021-04-10 12:55:50.014897+02:00

使用timedatectl

代码语言:javascript
复制
 timedatectl status
               Local time: Sa 2021-04-10 12:57:51 CEST #wrong time
           Universal time: Sa 2021-04-10 10:57:51 UTC 
                 RTC time: Sa 2021-04-10 10:57:51     
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no                         
              NTP service: inactive                   
          RTC in local TZ: no                         

重新配置tzdata没有帮助;时区是正确的设置。

也曾尝试过:

代码语言:javascript
复制
timedatectl set-local-rtc 0

。。帮不上忙,但也许我理解错了。

内核:

代码语言:javascript
复制
uname -r
5.4.0-70-generic

注:双启动与debian没有窗口存在。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2021-04-10 11:02:54

默认情况下,Ubuntu期望您的硬件时钟在UTC上运行,并基于此计算您的本地时间。

如果你不想那样的话,请看如何告诉Ubuntu硬件时钟是本地时间?。请注意,在本例中,Ubuntu不调整夏令时的时钟。

通常更好的做法是使用UTC作为硬件时钟(除非您需要dualboot,一个不支持UTC的系统,就像一些旧的Windows版本)。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1330480

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档