diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-01 20:55:25 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-01 20:55:25 -0500 |
commit | 74a8bc32c3aa311343981a97e2f4e69d5434f2c0 (patch) | |
tree | 86eceb549d6836e07bdd23e353bdbf3064761e3b /pseudonmea.c | |
parent | cecc68819d987633d2b138f6a033b0422527ad9c (diff) | |
download | gpsd-74a8bc32c3aa311343981a97e2f4e69d5434f2c0.tar.gz |
Make generated ZDAs report a UTC timezome, since UTC is what they emit.
Diffstat (limited to 'pseudonmea.c')
-rw-r--r-- | pseudonmea.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/pseudonmea.c b/pseudonmea.c index 980bc4ba..efac75cc 100644 --- a/pseudonmea.c +++ b/pseudonmea.c @@ -226,25 +226,19 @@ static void gpsd_binary_time_dump(struct gps_device_t *session, struct tm tm; double integral, fractional; time_t integral_time; - int tz_hour, tz_min; if (session->newdata.mode > MODE_NO_FIX) { fractional = modf(session->newdata.time, &integral); integral_time = (time_t) integral; (void)gmtime_r(&integral_time, &tm); - (void)tzset(); - tz_hour = timezone / 3600; - tz_min = abs(timezone / 60 - tz_hour * 60); (void)snprintf(bufp, len, - "$GPZDA,%02d%02d%05.2f,%02d,%02d,%04d,%+03d,%02d", + "$GPZDA,%02d%02d%05.2f,%02d,%02d,%04d,00,00", tm.tm_hour, tm.tm_min, (double)tm.tm_sec + fractional, tm.tm_mday, tm.tm_mon + 1, - tm.tm_year + 1900, - tz_hour, - tz_min); + tm.tm_year + 1900); nmea_add_checksum(bufp); } } |