diff options
author | Gary E. Miller <gem@rellim.com> | 2016-09-12 21:07:18 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-09-12 21:07:18 -0700 |
commit | 2d8ae8aad520607a9eca92064097f19ec239588d (patch) | |
tree | 2516348cc831fef4be25677aa40f4a5cbc066d24 /gps | |
parent | dc72347e48c0589fc4d94a0754b4f5d93864b7dc (diff) | |
download | gpsd-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-x | gps/gps.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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) |