summaryrefslogtreecommitdiff
path: root/navit/vehicle/demo/vehicle_demo.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-07-12 16:13:41 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-07-12 16:13:41 +0000
commit3c75801a7e05811a741b31b4138308428fdd59c6 (patch)
treef9c3a420e4d11ec6abe8796efc923112aca679ce /navit/vehicle/demo/vehicle_demo.c
parent7538c7b5e8b8ae4ab438f52fb389ff03af82c516 (diff)
downloadnavit-3c75801a7e05811a741b31b4138308428fdd59c6.tar.gz
Fix:vehicle_demo:Give back a reasonable timestamp
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2394 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle/demo/vehicle_demo.c')
-rw-r--r--navit/vehicle/demo/vehicle_demo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c
index 76d56349e..f1316fc06 100644
--- a/navit/vehicle/demo/vehicle_demo.c
+++ b/navit/vehicle/demo/vehicle_demo.c
@@ -44,6 +44,7 @@ struct vehicle_priv {
double direction;
struct callback *timer_callback;
struct event_timeout *timer;
+ char *timep;
};
@@ -67,6 +68,11 @@ vehicle_demo_position_attr_get(struct vehicle_priv *priv,
case attr_position_coord_geo:
attr->u.coord_geo = &priv->geo;
break;
+ case attr_position_time_iso8601:
+ g_free(priv->timep);
+ priv->timep=current_to_iso8601();
+ attr->u.str=priv->timep;
+ break;
default:
return 0;
}