bsidb
2016-01-04 02:36 deepin
应该是差8个小时吧。
因为Linux用的时间是UTC标准时间,Windows用的是北京时间,所以应该正好差8个小时。
这个的话,目前还没有太完美的解决方案。
One reason users often set the RTC in localtime is to dual boot with Windows (which uses localtime). However, Windows is able to deal with the RTC being in UTC with a simple registry fix. It is recommended to configure Windows to use UTC, rather than Linux to use localtime. If you make Windows use UTC, also remember to disable the "Internet Time Update" Windows feature, so that Windows does not mess with the hardware clock, trying to sync it with internet time. You should instead use an agent for the NTP to modify the RTC and sync to internet time, see #Time synchronization.
Using regedit, add a DWORD value with hexadecimal value 1 to the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
Alternatively, create a *.reg file (on the desktop) with the following content and double-click it to import it into registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
If the above appears to have no affect, and a 64-bit variant of Windows is being used, using a QWORD value instead of a DWORD value may resolve the issue.
Should Windows ask to update the clock due to DST changes, let it. It will leave the clock in UTC as expected, only correcting the displayed time.
The hardware clock and system clock time may need to be updated after setting this value.
If you are having issues with the offset of the time, try reinstalling tzdata and then setting your time zone again:
# timedatectl set-timezone America/Los_Angeles
It makes sense to disable time synchronization in Windows - otherwise it will mess up the hardware clock.
因为Linux用的时间是UTC标准时间,Windows用的是北京时间,所以应该正好差8个小时。
这个的话,目前还没有太完美的解决方案。
One reason users often set the RTC in localtime is to dual boot with Windows (which uses localtime). However, Windows is able to deal with the RTC being in UTC with a simple registry fix. It is recommended to configure Windows to use UTC, rather than Linux to use localtime. If you make Windows use UTC, also remember to disable the "Internet Time Update" Windows feature, so that Windows does not mess with the hardware clock, trying to sync it with internet time. You should instead use an agent for the NTP to modify the RTC and sync to internet time, see #Time synchronization.
Using regedit, add a DWORD value with hexadecimal value 1 to the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
Alternatively, create a *.reg file (on the desktop) with the following content and double-click it to import it into registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
If the above appears to have no affect, and a 64-bit variant of Windows is being used, using a QWORD value instead of a DWORD value may resolve the issue.
Should Windows ask to update the clock due to DST changes, let it. It will leave the clock in UTC as expected, only correcting the displayed time.
The hardware clock and system clock time may need to be updated after setting this value.
If you are having issues with the offset of the time, try reinstalling tzdata and then setting your time zone again:
# timedatectl set-timezone America/Los_Angeles
It makes sense to disable time synchronization in Windows - otherwise it will mess up the hardware clock.
Reply Like 0 View the author