SignalK / signalk-server-java

DEPRECATED - see https://github.com/SignalK/signalk-java
Apache License 2.0
6 stars 9 forks source link

Util/checkTime(...) #3

Closed woobagooba closed 9 years ago

woobagooba commented 9 years ago

Several issues/questions here....

  1. Method does not work for Windows systems.
  2. The addition of 1900 to date.getYear() does not look correct.
  3. What is the intent of the system time being set from the receipt of an NMEA RMC sentence? a. Why RMC? Why not N2K PGN? Why is this being done at all? b. Old 0183 replayed into the system will cause a backwards discontinuity in system time, likely negatively impacting other apps, processes, security mechanisms. c. Any NTP daemon running will likely set it forward again.
rob42 commented 9 years ago

Needs attention. Its old code from my early installs on RPi in my boat. the RPi doesnt have a clock, and i only have NMEA0183, so I grabbed it from the RMC sentence, which is in realtime on the boat. Saves me setting the time after every reboot :-)

But its clearly not suitable in the use cases above. I will add a config flag to turn it off for now.

rob42 commented 9 years ago

Added 'signalk.clock.source=system' to signalk.cfg. Set to 'rmc' to enable clock from RMC sentence.

woobagooba commented 9 years ago

Thank you Rob