ubuntu下怎么禁用utc时间

40次阅读
没有评论

共计 1062 个字符,预计需要花费 3 分钟才能阅读完成。

本篇内容介绍了“ubuntu 下怎么禁用 utc 时间”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让丸趣 TV 小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

前言

大家在安装双系统以后,发现进入 win7 和 ubuntu 系统以后,显示的时间不一致,后来发现是两个系统对硬件时间的看法不一致

原因如下

1、Windows 会认为 BIOS 时间就是你的本地时间

2、ubuntu 默认时间是把 BIOS 时间当成 GMT+ 0 时间,也就是世界标准时,而我国在东八区(GMT+8),所以如果你的 Ubuntu 位置是中国的话你系统显示的时间就是 BIOS 时间 + 8 小时。假如现在是早上 8 点,那么你 Ubuntu 会显示 8 点,这时 BIOS 中的时间是 0 点。

更正方法

将 ubuntu 对待 bios 时间的方法改为和 windows 一致。

代码:

sudo timedatectl set-local-rtc 1

代码:

$ timedatectl
Local time:  六  2016-04-23 09:05:54 CST
Universal time:  六  2016-04-23 01:05:54 UTC
RTC time:  六  2016-04-23 09:05:54
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 .

“ubuntu 下怎么禁用 utc 时间”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注丸趣 TV 网站,丸趣 TV 小编将为大家输出更多高质量的实用文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-13发表,共计1062字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)