diff options
-rw-r--r-- | gpsdecode.c | 1 | ||||
-rw-r--r-- | libgpsd_core.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index b1634392..ca1f3600 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -398,6 +398,7 @@ static void decode(FILE *fpin, FILE*fpout) policy.json = json; gps_context_init(&context); + gpsd_time_init(&context, time(NULL)); context.readonly = true; gpsd_init(&session, &context, NULL); gpsd_clear(&session); diff --git a/libgpsd_core.c b/libgpsd_core.c index 8f1a19a1..7cd11cb9 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1036,7 +1036,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) gpsd_report(LOG_WARN, "date more than a year in the future!\n"); else if (session->newdata.time < 0) - gpsd_report(LOG_ERROR, "date is negative!\n"); + gpsd_report(LOG_ERROR, "date in %s is negative!\n", session->gpsdata.tag); } /*@-relaxtypes -longunsignedintegral@*/ |