Skip to content
Snippets Groups Projects
Commit b9eb1fef authored by Pierre LALET's avatar Pierre LALET
Browse files

Fix TimeStampField.any2i() used with a string

parent fa299812
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,8 @@ class TimeStampField(FixedPointField): ...@@ -30,8 +30,8 @@ class TimeStampField(FixedPointField):
def any2i(self, pkt, val): def any2i(self, pkt, val):
if type(val) is str: if type(val) is str:
return int(time.mktime(time.strptime(val))) + _NTP_BASETIME + 3600 # XXX val = int(time.mktime(time.strptime(val))) + _NTP_BASETIME
return FixedPointField.any2i(self,pkt,val) return FixedPointField.any2i(self, pkt, val)
def i2m(self, pkt, val): def i2m(self, pkt, val):
if val is None: if val is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment