summaryrefslogtreecommitdiff
path: root/test_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-29 08:24:30 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-29 08:24:30 -0500
commit34e440c26892b2950d7a368974bbbf59fdf59883 (patch)
tree130a34a5942111b62415d16c8dbe420cecbf2926 /test_json.c
parent50ac32cd433dd8c4a3da702edea4765694315492 (diff)
downloadgpsd-34e440c26892b2950d7a368974bbbf59fdf59883.tar.gz
Timestamps in TPV and SKY go from float seconds since Unix epoch to ISO8601.
Protocol version number is bumped. Python and C test clients are known to work; interfaces of the C and Python client bindings are unchanged. Third-party client-side bindings which rely on naively copying JSON members will break (implementers have been repeatedly warned not to do this).
Diffstat (limited to 'test_json.c')
-rw-r--r--test_json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test_json.c b/test_json.c
index e5f3f185..38ad9d0c 100644
--- a/test_json.c
+++ b/test_json.c
@@ -88,13 +88,13 @@ static struct gps_data_t gpsdata;
/* *INDENT-OFF* */
static const char json_str1[] = "{\"class\":\"TPV\",\
\"device\":\"GPS#1\",\"tag\":\"MID2\", \
- \"time\":1119197561.890,\"lon\":46.498203637,\"lat\":7.568074350,\
+ \"time\":\"2005-06-19T08:12:41.89Z\",\"lon\":46.498203637,\"lat\":7.568074350,\
\"alt\":1327.780,\"epx\":21.000,\"epy\":23.000,\"epv\":124.484,\"mode\":3}";
/* Case 2: SKY report */
static const char *json_str2 = "{\"class\":\"SKY\",\
- \"tag\":\"MID4\",\"time\":1119197562.890, \
+ \"tag\":\"MID4\",\"time\":\"2005-06-19T12:12:42.03Z\", \
\"satellites\":[\
{\"PRN\":10,\"el\":45,\"az\":196,\"ss\":34,\"used\":true},\
{\"PRN\":29,\"el\":67,\"az\":310,\"ss\":40,\"used\":true},\
@@ -219,7 +219,7 @@ int main(int argc UNUSED, char *argv[]UNUSED)
assert_string("device", gpsdata.dev.path, "GPS#1");
assert_string("tag", gpsdata.tag, "MID2");
assert_integer("mode", gpsdata.fix.mode, 3);
- assert_real("time", gpsdata.fix.time, 1119197561.890);
+ assert_real("time", gpsdata.fix.time, 1119168761.8900001);
assert_real("lon", gpsdata.fix.longitude, 46.498203637);
assert_real("lat", gpsdata.fix.latitude, 7.568074350);