温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ubuntu下怎么禁用utc时间

发布时间:2022-11-19 10:41:18 来源:亿速云 阅读:153 作者:iii 栏目:服务器

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

前言

大家在安装双系统以后,发现进入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时间”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI