summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2019-03-20 13:05:10 -0700
committerFred Wright <fw@fwright.net>2019-03-20 13:20:12 -0700
commit564200f62f9111609bb95626447a30f57db05ddd (patch)
treea7b86a6b3ccc2ed1ecb94d03fc9bfe3015c359fd /SConstruct
parent91d64f90a5b891fc9e79b0f356747ebbef1d3b89 (diff)
downloadgpsd-564200f62f9111609bb95626447a30f57db05ddd.tar.gz
Fix fencepost errors in GPS epoch (mainly comments).
The definition of GPS_EPOCH in gpsd.h is correct, but the comment specified the incorrect corresponding date, which is 06-Jan-1980, not 06-Jan-1981, which isn't even a Sunday. The century hack in driver_nmea0183.c establishes a 100-year window for interpreting two-digit years. For now, the range 1980-2079 is reasonable, given that the GPS epoch is 06-Jan-1980, and the mention of wrapping "at" 2080 is consistent with this, but the comment incorrectly placed the GPS epoch in 1981 (perhaps due to believing the wrong comment in gpsd.h), and the code was written to wrap *after* 2080, rather than *at* 2080. This would place the window at 1981-2080, which would screw up 1980 (admittedly an unlikely case). This is mostly about not misleading people reading the code than actual real-life trouble. TESTED: Existing tests pass. A test case for a year of "80" would be needed to actually verify the fix, though.
Diffstat (limited to 'SConstruct')
0 files changed, 0 insertions, 0 deletions