使用u盘ubuntu之后,原来windows系统的时间变了?

「已注销」 2014-02-07 10:01:04
我在u盘里面做了个ubuntu系统,每次使用了ubuntu之后,重启回到windows 7,win7的时间总是变慢好几个小时。如目前的时间是10:00,重启登录u盘的ubuntu之后,再切回到win7,时间变成了1:00。请问这怎么回事啊?
...全文
715 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
carvedog2 2014-02-08
  • 打赏
  • 举报
回复
问这个问题我就无语了,你先man 一下 hwclock、date、clock,这几个的命令,你直接敲一下就会发现不同,再看一下系统的时间同步参数UTC,关键是你怎么设置的,这个和windows没关系,要是设得不同,你用federo启完用,ubundu再启也会变。就是同样是ubundu,时间策略不同,启完也会变。 当然,要是你的hwclock 和date出来的是一样的,改了还会变。那你是不是用了ntp服务又设错时区了。 我的意思是:不管你是玩linux、unix,arm、pc、小型机、中型机、大型机......系统的时间概念还是要清晰的!和windows没关系。
Linux-Torvalds 2014-02-08
  • 打赏
  • 举报
回复
Multiple Boot Systems Time Conflicts Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the 'local' time. This causes problems in a dual boot system if both systems view the hardware clock differently. The advantage of having the hardware clock as UTC is that you don't need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets. Changing Linux to use local time is easier and more reliable than changing Windows to use UTC, so dual-boot Linux/Windows systems tend to use local time. Since Intrepid (8.10), UTC=yes is default. Make Windows use UTC Note: This method was not initially supported on Windows Vista and Server 2008, but came back with Vista SP2, Windows 7 and Server 2008 R2. To make MS Windows calculate the time from the hardware clock as UTC. Create a file named WindowsTimeFixUTC.reg with the following contents and then double click on it to merge the contents with the registry:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
     "RealTimeIsUniversal"=dword:00000001
Reversing the change You can create a file with the following contents and then double-click it to merge in the original changes, as above:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
     "RealTimeIsUniversal"=dword:00000000
or you can enter Registry Editor with
regedit
and navigate down to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\
and delete RealTimeIsUniversal by right-clicking it and deleting it. Make Linux use 'Local' time To tell your Ubuntu system that the hardware clock is set to 'local' time: edit /etc/default/rcS add or change the following section
# Set UTC=yes if your hardware clock is set to UTC (GMT)
UTC=no
mayer 2014-02-07
  • 打赏
  • 举报
回复
run this command in ubuntu: sudo hwclock -w --localtime
lgt633744 2014-02-07
  • 打赏
  • 举报
回复
这是你u盘系统中配置文件有问题,编辑文件 /etc/default/rcS, 找到UTC=yes,修改成UTC=no 保存文件,在系统->系统管理->日期和时间中,设置为正确的日期和时间,在命令行输入下面的命令重启时间: sudo /etc/init.d/hwclock.sh restart 我只能帮你到这了。

1,543

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 Solaris
社区管理员
  • Solaris
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧