Permalink
Browse files

Update slapd importer with local timezone

Signed-off-by: Brandon Myers <bmyers@mozilla.com>
  • Loading branch information...
pwnbus committed Jul 12, 2016
1 parent 1ae54e2 commit d206fa157c707ac5358876408a6520758be73130
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/slapd2mozdef.py
View
@@ -11,6 +11,7 @@
import requests
import dateutil.parser
import datetime
+from dateutil.tz import tzlocal
import json
from requests_futures.sessions import FuturesSession
@@ -190,7 +191,7 @@ def searchforBind(line,bindDetails):
for bindConn in bindConnre.findall(line):
if '{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2]) not in bindDetails.keys():
#a new bind transaction we've not seen with default values
- bindDetails['{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2])]=dict(conn=bindConn[0],op=bindConn[1],dn=bindConn[2],errCode=None,result='unknown',ipAddress='0.0.0.0',eventtime=dateutil.parser.parse(line[:20],fuzzy=True).isoformat())
+ bindDetails['{0}:{1}:{2}'.format(bindConn[0],bindConn[1],bindConn[2])]=dict(conn=bindConn[0],op=bindConn[1],dn=bindConn[2],errCode=None,result='unknown',ipAddress='0.0.0.0',eventtime=dateutil.parser.parse(line[:20],fuzzy=True,tzinfos=tzlocal).isoformat())
def searchforBindResult(line,bindDetails,linecache):
'''match outstanding binds without results to any new RESULT lines'''

0 comments on commit d206fa1

Please sign in to comment.