当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 双系统下时间问题,rcS中没有UTC=yes这一句
帖子发表于 : 2016-05-19 14:55 

注册: 2016-05-12 20:20
帖子: 21
系统: Ubuntu 16.04
送出感谢: 4
接收感谢: 0 次
windows和Ubuntu两个时间不同,差8小时。
网上找的解决方法都是在 /etc/default/rcS中将UTC=yes设为UTC=no。
但我在这个文件中没有找到,下面是这个文件:
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
#TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no

# do not allow users to log in until the boot has completed
#DELAYLOGIN=no

# be more verbose during the boot process
#VERBOSE=no

# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no


_________________
不知从何时起,我的Ubuntu已经被折腾的千疮百孔了


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 双系统下时间问题,rcS中没有UTC=yes这一句
帖子发表于 : 2016-05-19 15:33 
头像

注册: 2011-03-20 13:12
帖子: 4522
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
EEdoger 写道:
Ubuntu 16.04

两套方案

=================
1 - 硬件时钟使用 UTC
=================
1-1.
代码:
timedatectl set-local-rtc 0
timedatectl set-ntp 1

1-2. 修改 Windows 注册表:
代码:
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1

1-3. 关闭 Windows 网络对时

====================
2 - 硬件时钟使用本地时间
====================
2-1.
代码:
timedatectl set-local-rtc 1 --adjust-system-clock
timedatectl set-ntp 0

2-2. 打开 Windows 网络对时


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 双系统下时间问题,rcS中没有UTC=yes这一句
帖子发表于 : 2016-05-19 16:56 

注册: 2016-05-12 20:20
帖子: 21
系统: Ubuntu 16.04
送出感谢: 4
接收感谢: 0 次
vickycq 写道:
EEdoger 写道:
Ubuntu 16.04

两套方案

=================
1 - 硬件时钟使用 UTC
=================
1-1.
代码:
timedatectl set-local-rtc 0
timedatectl set-ntp 1

1-2. 修改 Windows 注册表:
代码:
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1

1-3. 关闭 Windows 网络对时

====================
2 - 硬件时钟使用本地时间
====================
2-1.
代码:
timedatectl set-local-rtc 1 --adjust-system-clock
timedatectl set-ntp 0

2-2. 打开 Windows 网络对时


多谢


_________________
不知从何时起,我的Ubuntu已经被折腾的千疮百孔了


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 双系统下时间问题,rcS中没有UTC=yes这一句
帖子发表于 : 2016-05-20 10:40 
头像

注册: 2007-10-19 20:40
帖子: 837
送出感谢: 71
接收感谢: 10
反复试过后,个人觉得还是让 Windows 使用 UTC 最好。就是 @poloshiao 修改注册表的那条。注意如是 64 位的win系统要建立 64 位的键值。


_________________
Live and let live.


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译