目前兩邊系統都能解,不過 systemd 好像把問題變得更複雜了
我應該下什麼指令去解決?依稀記得n年前遇過一次,當時Linux下指令解決的
我不想Windows關時間校正同步,所以想再linux這側解決
# timedatectl set-local-rtc 1
set-local-rtc [BOOL]
Takes a boolean argument. If "0", the system is configured to
maintain the RTC in universal time. If "1", it will maintain the
RTC in local time instead. Note that maintaining the RTC in the
local timezone is not fully supported and will create various
problems with time zone changes and daylight saving adjustments. If
at all possible, keep the RTC in UTC mode. Note that invoking this
will also synchronize the RTC from the system clock, unless
--adjust-system-clock is passed (see above). This command will
change the 3rd line of /etc/adjtime, as documented in hwclock(8).
(shell) timedatectl status
Local time: 日 2017-04-23 00:37:33 CST
Universal time: 六 2017-04-22 16:37:33 UTC
RTC time: 日 2017-04-23 00:37:33
Time zone: Asia/Taipei (CST, +0800)
Network time on: yes
NTP synchronized: yes
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'.
因為之前電腦只有windows,今天安裝ubt後變成雙系統,切換回win的時候時間會差8小時(早)
一般不會建議把Linux設定成用local RTC…
是的,但我記得可以在ubt中改設置,所以不用關閉win同步就可以解決?
有看到有人提到,帽似是如果隨意更換時區或是遇到夏日節約的時候就爆炸了?
不過因為我應該都不會改時區,而且夏日節約的問題我基本不會遇到
問題來了:Windows系統會主動把任何主人設定的時鐘拿去改CMOS Clock,而Linux元初也會去讀CMOS Clock來設定自己的時間;但是在有網路的情況下,Linux會自動校正成UTC,而Windows預設不跟網路校時,那你會選擇哪條路呢?1. 調整Linux 讓它只關照自己的內部CMOS時間,然後得定期進入Windows來讓Windows幫你更新CMOS時間。或是 2. 讓Windows直接同步UTC,這樣子兩邊的時間都是跟隨UTC而不是機體本身的時間
解:因為我大部分時間都在Windows上,所以反而偶爾才會進Linux
我覺得問題是為什麼讓 Linux 將硬體時鐘視為本地時間會妨礙他更新硬體時鐘
先回報,剛剛開回Windows不意外時間又跑掉然後被網路時鐘更正,明天早上再來切換一次,這次應該就不會有事情了
我開機時的網路狀態不是很固定,有網路開機與無網路開機大概是五五波
Windows假設硬體會說謊,Linux假設硬體都是誠實的
簡單來講,就是兩個系統在建構的時候就秉持不同的價值觀吧
Windows連客戶都假設他們是使用盜版的犯罪者…
不涉及哲學問題,我單純只是不想把解決問題的方式放在一個專有的作業系統上而已
萬一 Windows 不支援將硬體時間識別為 UTC 時間怎辦?
而且,硬體時間跟UTC時間本來就是兩套東西…怎麼把A識別為B?
應該說解讀吧
解讀為本地時間跟解讀為 UTC+0 的差異