use py2-style timestamp-retrieval

This commit is contained in:
Thor77 2016-05-08 21:54:58 +02:00
parent b3427ec785
commit 7e2f4ba09f
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ def parse_logs(log_path, ident_map={}, file_log=False):
parts = line.split('|')
log_format = '%Y-%m-%d %H:%M:%S.%f'
stripped_time = datetime.strptime(parts[0], log_format)
logdatetime = int(stripped_time.timestamp())
logdatetime = int((stripped_time - datetime(1970, 1, 1))
.total_seconds())
data = '|'.join(parts[4:]).strip()
if data.startswith('client'):
nick, clid = re_dis_connect.findall(data)[0]