bo-yang / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

timesync sucks #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the current way to sync time sucks
the system should

1. sync to RTC on bootup (the kernel probably should do this)
2. sync to NTP if possible on bootup and every few hours
3. set RTC while doing so

whether the RTC is local or not needs a better way of tracking (plan9.ini?)
i'm not running windows, so i'd prefer RTC to be UTC, for one

currently setrtc and timesync seem to interfere, causing the hour to jump on 
every reboot. this sucks. (removing L from timesync arguments fixes it, though)

Original issue reported on code.google.com by a...@phicode.de on 29 May 2011 at 11:27

GoogleCodeExporter commented 9 years ago
setrtc doesnt know about your localtime offset and just writes the
system time (in GMT) to the rtc. the -L flag to aux/timesync only
offsets the time *READ* from the rtc. aux/timesync can only sync
from one timesource (rtc, ntp, fs, gps) and it only synchronizes to
the system time! it never writes to the rtc itself! setrtc is called
on fshalt.

Original comment by cinap_le...@felloff.net on 30 May 2011 at 7:50

GoogleCodeExporter commented 9 years ago
i think the best way would be to teach aux/timesync to write the synced
time to the rtc and honor the -L parameter when doing so.

Original comment by cinap_le...@felloff.net on 30 May 2011 at 8:12

GoogleCodeExporter commented 9 years ago

Original comment by cinap_le...@felloff.net on 15 Jun 2011 at 7:18