fix formatting of timestamps

Change-Id: I92e714833f333b13257e8e54561aa18716d89ecb
This commit is contained in:
Enrico Faulhaber
2017-09-07 16:37:03 +02:00
parent 79ca140874
commit dc891466cb
3 changed files with 8 additions and 3 deletions

View File

@ -138,12 +138,16 @@ class Value(object):
self.value = value
self.__dict__.update(qualifiers)
if 't' in qualifiers:
self.t = parse_time(qualifiers['t'])
try:
self.t = float(qualifiers['t'])
except Exception:
self.t = parse_time(qualifiers['t'])
def __repr__(self):
r = []
if self.t is not None:
r.append("timestamp=%r" % format_time(self.t))
print("Check 3")
if self.u is not None:
r.append('unit=%r' % self.u)
if self.e is not None: