Merge branch 'dev', v0.6.31

acfcf7f - bump to v0.6.31
d57c368 - fix incorrect prasing of timestamps
5a7da98 - fix reload(aprslib) not working due to init hacks
This commit is contained in:
Rossen Georgiev 2014-12-27 20:36:42 +00:00
commit c7ddb38d8f
3 changed files with 24 additions and 26 deletions

View File

@ -27,16 +27,21 @@ from datetime import date as _date
__date__ = str(_date.today())
del _date
from . import version
__version__ = version.__version__
del version
from .version import __version__ as ref_version
__version__ = ref_version
del ref_version
__author__ = "Rossen Georgiev"
__all__ = ['IS', 'parse']
from .parse import parse
from . import IS
from .parse import parse as refparse
parse = refparse
del refparse
from .IS import IS as refIS
class IS(IS.IS):
class IS(refIS):
pass
del refIS

View File

@ -118,29 +118,22 @@ def parse(raw_sentence):
parsed.update({'raw_timestamp': rawts})
timestamp = 0
try:
if form in "hz/":
if form == 'h': # zulu hhmmss format
timestamp = utc.strptime(
"%s %s %s %s" % (utc.year, utc.month, utc.day, ts),
"%Y %m %d %H%M%S"
)
elif form == 'z': # zulu ddhhss format
timestamp = utc.strptime(
"%s %s %s" % (utc.year, utc.month, ts),
"%Y %m %d%M%S"
)
elif form == '/': # '/' local ddhhss format
timestamp = utc.strptime(
"%s %s %s" % (utc.year, utc.month, ts),
"%Y %m %d%M%S"
)
# zulu hhmmss format
if form == 'h':
timestamp = "%s%s%s%s" % (utc.year, utc.month, utc.day, ts)
# zulu ddhhmm format
# '/' local ddhhmm format
elif form in 'z/':
timestamp = "%s%s%s%s" % (utc.year, utc.month, ts, utc.second)
timestamp = utc.strptime(timestamp, "%Y%m%d%H%M%S")
timestamp = time.mktime(timestamp.timetuple())
else:
timestamp = 0
except:
timestamp = 0
except Exception as exp:
logger.debug(exp)
pass
parsed.update({'timestamp': int(timestamp)})

View File

@ -1 +1 @@
__version__ = '0.6.30'
__version__ = '0.6.31'