summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-09-12 21:07:18 -0700
committerGary E. Miller <gem@rellim.com>2016-09-12 21:07:18 -0700
commit2d8ae8aad520607a9eca92064097f19ec239588d (patch)
tree2516348cc831fef4be25677aa40f4a5cbc066d24 /gps
parentdc72347e48c0589fc4d94a0754b4f5d93864b7dc (diff)
downloadgpsd-2d8ae8aad520607a9eca92064097f19ec239588d.tar.gz
gpsddata.fix.time was toggling from ISO time string to UNIX seconds
JSON TPV always sends ISO 8601 strings, as documented in gpsd_json(5)
Diffstat (limited to 'gps')
-rwxr-xr-xgps/gps.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/gps/gps.py b/gps/gps.py
index be90ba98..949cc92c 100755
--- a/gps/gps.py
+++ b/gps/gps.py
@@ -215,11 +215,9 @@ class gps(gpscommon, gpsdata, gpsjson):
self.valid = ONLINE_SET
self.utc = default("time", None, TIME_SET)
if self.utc is not None:
- # Time can be either Unix time as a float or an ISO8601 string
- if type(self.fix.time) == type(0.0):
- self.fix.time = self.utc
- else:
- self.fix.time = isotime(self.utc)
+ # self.utc is always iso 8601 string
+ # just copy to fix.time
+ self.fix.time = self.utc
self.fix.ept = default("ept", NaN, TIMERR_SET)
self.fix.latitude = default("lat", NaN, LATLON_SET)
self.fix.longitude = default("lon", NaN)