[ntp:questions] ntp & system without a rtc
nomail at example.com
Fri May 10 17:33:19 UTC 2013
folkert <folkert at vanheusden.com> wrote:
>> > I have a raspberry pi system. This is a computer without a real time
>> > clock. So everytime I power it on, it uses starts where it left off
>> > which might be days earlier. It is connected only very occasionally to
>> > the internet so syncing to that won't work. It does have, however, a gps
>> > connected. But as it is switched mostly for less than an hour, ntpd
>> > won't have the time to adjust the time to what the gps returns to it.
>> > So I was wondering: is there a utility/a trick out there that picks the
>> > current time from a gps and then "jumps" the time to what it should be?
>> > It does not need to be very accurate - a couple of seconds off is ok
>> > (just not hours or days).
>> > Any ideas?
>> How do you access the GPS receiver? Via gpsd?
> Via gpsd indeed. But it that is a problem I can do other things first
> before I start gpsd.
No, with gpsd it is easier because you can connect the gpsd
port and ask it for the current time without having to worry
about parsing the gps data, sharing the serial port with other
Just send a D command to gpsd, get and parse the reply and set the clock.
Maybe a program to do that is already available on the net.
More information about the questions