modify so that it runs with python 3.5, too

This commit is contained in:
Jakob Ketterl 2019-07-21 13:07:38 +01:00
parent 2fae8ffa70
commit 6900810f5d

View File

@ -216,8 +216,8 @@ class WsjtParser(object):
logger.exception("error while parsing wsjt message") logger.exception("error while parsing wsjt message")
def parse_timestamp(self, instring, dateformat): def parse_timestamp(self, instring, dateformat):
ts = datetime.strptime(instring, dateformat).replace(tzinfo=timezone.utc) ts = datetime.strptime(instring, dateformat)
return int(datetime.combine(date.today(), ts.time(), timezone.utc).timestamp() * 1000) return int(datetime.combine(date.today(), ts.time()).replace(tzinfo=timezone.utc).timestamp() * 1000)
def parse_from_jt9(self, msg): def parse_from_jt9(self, msg):
# ft8 sample # ft8 sample