summaryrefslogtreecommitdiff
path: root/pseudonmea.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-02 02:54:52 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-02 02:54:52 -0500
commit0354c635eb8286dc4a6af15f0a07c39105483ec4 (patch)
treec324536226cb86b195e186172bef694a9134b46b /pseudonmea.c
parent7882f91ad748863a4371be8ad9a8d1a3a3e4729e (diff)
downloadgpsd-0354c635eb8286dc4a6af15f0a07c39105483ec4.tar.gz
Explain why we emit ZDA in pseudo-nmea without timezone.
Diffstat (limited to 'pseudonmea.c')
-rw-r--r--pseudonmea.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pseudonmea.c b/pseudonmea.c
index efac75cc..a6b343ac 100644
--- a/pseudonmea.c
+++ b/pseudonmea.c
@@ -231,6 +231,15 @@ static void gpsd_binary_time_dump(struct gps_device_t *session,
fractional = modf(session->newdata.time, &integral);
integral_time = (time_t) integral;
(void)gmtime_r(&integral_time, &tm);
+ /*
+ * We pin this report to the GMT/UTC timezone. This may be technically
+ * incorrect; our sources on ZDA suggest that it should report local
+ * timezone. But no GPS we've ever seen actually does this, because it
+ * would require embedding a location-to-TZ database in the receiver.
+ * And even if we could do that, it would make our regression tests
+ * break any time they were run in a timezone different from the one
+ * where they were generated.
+ */
(void)snprintf(bufp, len,
"$GPZDA,%02d%02d%05.2f,%02d,%02d,%04d,00,00",
tm.tm_hour,