aboutsummaryrefslogtreecommitdiffstats
path: root/binding/afm-gps-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/afm-gps-binding.c')
-rw-r--r--binding/afm-gps-binding.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/binding/afm-gps-binding.c b/binding/afm-gps-binding.c
index ea40331..ffc787b 100644
--- a/binding/afm-gps-binding.c
+++ b/binding/afm-gps-binding.c
@@ -94,6 +94,13 @@ static json_object *populate_json_data(json_object *jresp)
json_object_object_add(jresp, "speed", value);
}
+ if (data.set & TIME_SET) {
+ char time[30];
+ unix_to_iso8601(data.fix.time, (char *) &time, sizeof(time));
+ value = json_object_new_string(time);
+ json_object_object_add(jresp, "timestamp", value);
+ }
+
jresp = populate_json_dop_data(jresp, &data.dop);
return jresp;