Comments (9)
FTR poorman internet time :
date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"
This could be an other approach that does not depend on having chrony installed and running.
from set-system-time.
I think it would be useful! For example my setup usually gets ntp time via 4G net connection, but sometimes there is no coverage, like rebooting the system offshore, and then set-system-time is the only feasible option on an N2K system afaik.
It would have to be robust, so that it works even on a minimal system with no chronyc. Naturally then it would not detect other time sources in use, but even then it should work.
How did you end up with 1-2 seconds for sk time? It is just using GPS time, I'd be surprised to get that long delay between GPS sentence and setting the time.
from set-system-time.
It's more of an estimation then a benchtest.
But set-system-time
is trigered at a round seconds, it read last navigation.datetime
witch can be anything between fresh to 1 sec old. and write it in date
If you add a bit of processing delay. I guess that in worst odds. you can leap a second twice.
And you can't be under one cuz at T = +0.0000 set-system-time
read navigation.datetime
data from T < -0.001 and write it at T > 0.001
But if there is no internet connection available. 1 second accuracy Is wayc enough for a sextant :p
from set-system-time.
trigered at a round seconds
You mean that datetime is being polled once per second? No, the whole process is driven by incoming data: when your server receives RMC NMEA0183 sentence via USB, it is converted to Signal K and the resulting datetime is passed on to the set-system-time. So there is certainly processing delay, but nothing else.
from set-system-time.
ah ok, understood.
from set-system-time.
PR have been accepted and changes are now in production :D
Closing.
from set-system-time.
I am afraid this is not working.
After booting chrony sets the correct time from NTP and everything works ok. When SK sets the time chrony detects a forward time jump: "System clock wrong by -2419199.119810 seconds" and this makes some applications like apt not work well. When set-system-time plugin is disabled everything works ok again.
from set-system-time.
Open a new issue with more details if you think there is something to fix here.
from set-system-time.
done: #12
from set-system-time.
Related Issues (9)
- streambundle error HOT 1
- set system time plugin resets time to wrong value in the past if gps doesn't have a fix. Do not trust GPS time if there is no fix HOT 1
- date: unrecognized option '--iso-8601' HOT 1
- set-system-time ignores chrony HOT 15
- Sanity check for the datetime: min/max values
- Different available versions HOT 1
- Check if sudo is password less. HOT 4
- Feature request: Time server HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from set-system-time.