From 79c5cf96ed8608acd042b129e035397ea738098b Mon Sep 17 00:00:00 2001 From: Brandon Myers Date: Thu, 13 Oct 2016 14:08:01 -0500 Subject: [PATCH] Update cron to use US/Pacific as timezone Signed-off-by: Brandon Myers --- cron/amoAlerts.py | 4 ++-- cron/auditDAlerts.py | 4 ++-- cron/auditDFileAlerts.py | 4 ++-- cron/broAlerts.py | 4 ++-- cron/bruteForcers.py | 4 ++-- cron/cloudTrailAlerts.py | 4 ++-- cron/cloudtrail2mozdef.py | 2 +- cron/collectAttackers.py | 6 +++--- cron/collectSSHFingerprints.py | 2 +- cron/compromisedCreds2fxa.py | 2 +- cron/correlateUserMacAddress.py | 2 +- cron/createIPBlockList.py | 2 +- cron/esCacheMaint.py | 2 +- cron/eventStats.py | 2 +- cron/eventStatsAlerts.py | 2 +- cron/fail2banAlerts.py | 4 ++-- cron/fxaAccountCreateAlerts.py | 4 ++-- cron/google2mozdef.py | 2 +- cron/healthAndStatus.py | 4 ++-- cron/healthToMongo.py | 4 ++-- cron/hostScannerAlerts.py | 4 ++-- cron/ldapAddAlerts.py | 4 ++-- cron/ldapDeleteAlerts.py | 4 ++-- cron/ldapGroupModifyAlerts.py | 4 ++-- cron/marketPlaceNotices.py | 4 ++-- cron/mig2mozdef.py | 2 +- cron/notifyRelengSSHAccess.py | 4 ++-- cron/okta2mozdef.py | 2 +- cron/relengComplianceNotices.py | 4 ++-- cron/syncAlertsToMongo.py | 4 ++-- 30 files changed, 50 insertions(+), 50 deletions(-) diff --git a/cron/amoAlerts.py b/cron/amoAlerts.py index 567083b7..10ab7aa6 100755 --- a/cron/amoAlerts.py +++ b/cron/amoAlerts.py @@ -37,7 +37,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -222,7 +222,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/auditDAlerts.py b/cron/auditDAlerts.py index 73806a3d..4b819d72 100755 --- a/cron/auditDAlerts.py +++ b/cron/auditDAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -424,7 +424,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/auditDFileAlerts.py b/cron/auditDFileAlerts.py index eff57122..b91a4eb4 100755 --- a/cron/auditDFileAlerts.py +++ b/cron/auditDFileAlerts.py @@ -37,7 +37,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -286,7 +286,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/broAlerts.py b/cron/broAlerts.py index 148002b2..9365bbc3 100755 --- a/cron/broAlerts.py +++ b/cron/broAlerts.py @@ -37,7 +37,7 @@ def initLogger(): sh.setFormatter(formatter) logger.addHandler(sh) -def toUTC(suspectedDate,localTimeZone="UTC"): +def toUTC(suspectedDate,localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc=pytz.UTC objDate=None @@ -238,7 +238,7 @@ def main(): def initConfig(): #change this to your default zone for when it's not specified - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) #msg queue settings options.mqserver=getConfig('mqserver','localhost',options.configfile) #message queue server hostname options.alertqueue=getConfig('alertqueue','mozdef.alert',options.configfile) #alert queue topic diff --git a/cron/bruteForcers.py b/cron/bruteForcers.py index c7d44cf9..408fa22e 100755 --- a/cron/bruteForcers.py +++ b/cron/bruteForcers.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -213,7 +213,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/cloudTrailAlerts.py b/cron/cloudTrailAlerts.py index 58b3f0f8..4d40e2fa 100755 --- a/cron/cloudTrailAlerts.py +++ b/cron/cloudTrailAlerts.py @@ -36,7 +36,7 @@ def initLogger(): sh.setFormatter(formatter) logger.addHandler(sh) -def toUTC(suspectedDate,localTimeZone="UTC"): +def toUTC(suspectedDate,localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc=pytz.UTC objDate=None @@ -161,7 +161,7 @@ def main(): def initConfig(): #change this to your default zone for when it's not specified - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) #msg queue settings options.mqserver=getConfig('mqserver','localhost',options.configfile) #message queue server hostname options.alertqueue=getConfig('alertqueue','mozdef.alert',options.configfile) #alert queue topic diff --git a/cron/cloudtrail2mozdef.py b/cron/cloudtrail2mozdef.py index 97631a62..5495563e 100755 --- a/cron/cloudtrail2mozdef.py +++ b/cron/cloudtrail2mozdef.py @@ -374,7 +374,7 @@ def initConfig(): options.output=getConfig('output','stdout',options.configfile) #output our log to stdout or syslog options.sysloghostname=getConfig('sysloghostname','localhost',options.configfile) #syslog hostname options.syslogport=getConfig('syslogport',514,options.configfile) #syslog port - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) options.aws_access_key_id=getConfig('aws_access_key_id','',options.configfile) #aws credentials to use to connect to cloudtrail options.aws_secret_access_key=getConfig('aws_secret_access_key','',options.configfile) options.esservers=list(getConfig('esservers','http://localhost:9200',options.configfile).split(',')) diff --git a/cron/collectAttackers.py b/cron/collectAttackers.py index 3f41e275..69299bcd 100755 --- a/cron/collectAttackers.py +++ b/cron/collectAttackers.py @@ -222,7 +222,7 @@ def searchMongoAlerts(mozdefdb): newAttacker['alertscount'] = len(newAttacker['alerts']) newAttacker['eventscount'] = len(newAttacker['events']) if newAttacker['eventscount'] > 0: - newAttacker['lastseentimestamp'] = toUTC(newAttacker['events'][-1]['documentsource']['utctimestamp'], 'UTC') + newAttacker['lastseentimestamp'] = toUTC(newAttacker['events'][-1]['documentsource']['utctimestamp'], 'US/Pacific') attackers.insert(newAttacker) #upate geoIP info latestGeoIP = [a['events'] for a in alerts.find( @@ -266,7 +266,7 @@ def searchMongoAlerts(mozdefdb): updateAttackerGeoIP(mozdefdb, attacker['_id'], alert['events'][-1]['documentsource']) # update last seen time - attacker['lastseentimestamp'] = toUTC(attacker['events'][-1]['documentsource']['utctimestamp'], 'UTC') + attacker['lastseentimestamp'] = toUTC(attacker['events'][-1]['documentsource']['utctimestamp'], 'US/Pacific') # update counts attacker['alertscount'] = len(attacker['alerts']) attacker['eventscount'] = len(attacker['events']) @@ -477,7 +477,7 @@ def main(): def initConfig(): #change this to your default timezone - options.defaulttimezone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaulttimezone=getConfig('defaulttimezone','US/Pacific',options.configfile) # output our log to stdout or syslog options.output = getConfig('output', 'stdout', options.configfile) # syslog hostname diff --git a/cron/collectSSHFingerprints.py b/cron/collectSSHFingerprints.py index 5b6de540..da1f5cad 100755 --- a/cron/collectSSHFingerprints.py +++ b/cron/collectSSHFingerprints.py @@ -47,7 +47,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None diff --git a/cron/compromisedCreds2fxa.py b/cron/compromisedCreds2fxa.py index ca81b7f0..5bb3e62a 100755 --- a/cron/compromisedCreds2fxa.py +++ b/cron/compromisedCreds2fxa.py @@ -189,7 +189,7 @@ def initConfig(): options.output=getConfig('output','stdout',options.configfile) #output our log to stdout or syslog options.sysloghostname=getConfig('sysloghostname','localhost',options.configfile) #syslog hostname options.syslogport=getConfig('syslogport',514,options.configfile) #syslog port - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) #default timezone + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) #default timezone options.mozdefurl = getConfig('url', 'http://localhost:8080/events', options.configfile) #mozdef event input url to post to options.lastrun=toUTC(getConfig('lastrun',toUTC(datetime.now()-timedelta(hours=24)),options.configfile)) options.recordlimit = getConfig('recordlimit', 1000, options.configfile) #max number of records to request diff --git a/cron/correlateUserMacAddress.py b/cron/correlateUserMacAddress.py index f8e71ba8..a20ce544 100755 --- a/cron/correlateUserMacAddress.py +++ b/cron/correlateUserMacAddress.py @@ -199,7 +199,7 @@ def initConfig(): # change this to your default zone for when it's not specified options.defaulttimezone = getConfig('defaulttimezone', - 'UTC', + 'US/Pacific', options.configfile) # elastic search server settings diff --git a/cron/createIPBlockList.py b/cron/createIPBlockList.py index 22d3d337..8237d84d 100755 --- a/cron/createIPBlockList.py +++ b/cron/createIPBlockList.py @@ -124,7 +124,7 @@ def main(): def initConfig(): #change this to your default timezone - options.defaulttimezone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaulttimezone=getConfig('defaulttimezone','US/Pacific',options.configfile) # output our log to stdout or syslog options.output = getConfig('output', 'stdout', options.configfile) # syslog hostname diff --git a/cron/esCacheMaint.py b/cron/esCacheMaint.py index 49bba3ea..8bb4096b 100755 --- a/cron/esCacheMaint.py +++ b/cron/esCacheMaint.py @@ -152,7 +152,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # elastic search options. options.esservers = list(getConfig('esservers', 'http://localhost:9200', options.configfile).split(',')) diff --git a/cron/eventStats.py b/cron/eventStats.py index ce3bc394..e5a15929 100755 --- a/cron/eventStats.py +++ b/cron/eventStats.py @@ -134,7 +134,7 @@ def initConfig(): # change this to your default zone for when it's not specified options.defaulttimezone = getConfig('defaulttimezone', - 'UTC', + 'US/Pacific', options.configfile) # elastic search server settings diff --git a/cron/eventStatsAlerts.py b/cron/eventStatsAlerts.py index a7d51954..3f77d0fc 100755 --- a/cron/eventStatsAlerts.py +++ b/cron/eventStatsAlerts.py @@ -152,7 +152,7 @@ def initConfig(): # change this to your default zone for when it's not specified options.defaulttimezone = getConfig('defaulttimezone', - 'UTC', + 'US/Pacific', options.configfile) # elastic search server settings diff --git a/cron/fail2banAlerts.py b/cron/fail2banAlerts.py index b2da9738..1ed7b41d 100755 --- a/cron/fail2banAlerts.py +++ b/cron/fail2banAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -180,7 +180,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/fxaAccountCreateAlerts.py b/cron/fxaAccountCreateAlerts.py index 5acf7cc2..ed98a22d 100755 --- a/cron/fxaAccountCreateAlerts.py +++ b/cron/fxaAccountCreateAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -216,7 +216,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/google2mozdef.py b/cron/google2mozdef.py index fc198cc7..ae388265 100755 --- a/cron/google2mozdef.py +++ b/cron/google2mozdef.py @@ -193,7 +193,7 @@ def initConfig(): options.output=getConfig('output','stdout',options.configfile) #output our log to stdout or syslog options.sysloghostname=getConfig('sysloghostname','localhost',options.configfile) #syslog hostname options.syslogport=getConfig('syslogport',514,options.configfile) #syslog port - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) #default timezone + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) #default timezone options.url = getConfig('url', 'http://localhost:8080/events', options.configfile) #mozdef event input url to post to options.lastrun=toUTC(getConfig('lastrun',toUTC(datetime.now()-timedelta(hours=24)),options.configfile)) options.recordlimit = getConfig('recordlimit', 1000, options.configfile) #max number of records to request diff --git a/cron/healthAndStatus.py b/cron/healthAndStatus.py index 3e0e9415..146df249 100755 --- a/cron/healthAndStatus.py +++ b/cron/healthAndStatus.py @@ -45,7 +45,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone='UTC'): +def toUTC(suspectedDate, localTimeZone='US/Pacific'): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -180,7 +180,7 @@ def initConfig(): # change this to your default zone for when it's not specified options.defaulttimezone = getConfig('defaulttimezone', - 'UTC', + 'US/Pacific', options.configfile) # elastic search server settings diff --git a/cron/healthToMongo.py b/cron/healthToMongo.py index 028eea92..96e9be12 100755 --- a/cron/healthToMongo.py +++ b/cron/healthToMongo.py @@ -43,7 +43,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -172,7 +172,7 @@ def initConfig(): options.mongoport = getConfig('mongoport', 3001, options.configfile) # change this to your default zone for when it's not specified options.defaulttimezone = getConfig('defaulttimezone', - 'UTC', + 'US/Pacific', options.configfile) diff --git a/cron/hostScannerAlerts.py b/cron/hostScannerAlerts.py index 7c1e714c..b1bd31fd 100755 --- a/cron/hostScannerAlerts.py +++ b/cron/hostScannerAlerts.py @@ -37,7 +37,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -220,7 +220,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/ldapAddAlerts.py b/cron/ldapAddAlerts.py index f10fe23c..bf772549 100755 --- a/cron/ldapAddAlerts.py +++ b/cron/ldapAddAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -178,7 +178,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/ldapDeleteAlerts.py b/cron/ldapDeleteAlerts.py index 3a85de34..422e1b8f 100755 --- a/cron/ldapDeleteAlerts.py +++ b/cron/ldapDeleteAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -178,7 +178,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/ldapGroupModifyAlerts.py b/cron/ldapGroupModifyAlerts.py index d9a4daef..6ea5d6f7 100755 --- a/cron/ldapGroupModifyAlerts.py +++ b/cron/ldapGroupModifyAlerts.py @@ -38,7 +38,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -179,7 +179,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # msg queue settings options.mqserver = getConfig('mqserver', 'localhost', options.configfile) # message queue server hostname options.alertqueue = getConfig('alertqueue', 'mozdef.alert', options.configfile) # alert queue topic diff --git a/cron/marketPlaceNotices.py b/cron/marketPlaceNotices.py index 44cd55fa..5d380ff1 100755 --- a/cron/marketPlaceNotices.py +++ b/cron/marketPlaceNotices.py @@ -40,7 +40,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -162,7 +162,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # logging settings options.output = getConfig('output', 'stdout', options.configfile) # output our log to stdout or syslog options.sysloghostname = getConfig('sysloghostname', 'localhost', options.configfile) # syslog hostname diff --git a/cron/mig2mozdef.py b/cron/mig2mozdef.py index ad22f059..94c73c9e 100755 --- a/cron/mig2mozdef.py +++ b/cron/mig2mozdef.py @@ -135,7 +135,7 @@ def initConfig(): options.output=getConfig('output','stdout',options.configfile) #output our log to stdout or syslog options.sysloghostname=getConfig('sysloghostname','localhost',options.configfile) #syslog hostname options.syslogport=getConfig('syslogport',514,options.configfile) #syslog port - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) # Z = UTC, -07:00 = PDT options.mighost=getConfig('mighost','https://localhost',options.configfile) options.gpghome=getConfig('gpghome','/home/someuser/.gnupg',options.configfile) diff --git a/cron/notifyRelengSSHAccess.py b/cron/notifyRelengSSHAccess.py index 38665fb1..af6a1aab 100644 --- a/cron/notifyRelengSSHAccess.py +++ b/cron/notifyRelengSSHAccess.py @@ -40,7 +40,7 @@ def initLogger(): sh.setFormatter(formatter) logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -139,7 +139,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # logging settings options.output = getConfig('output', 'stdout', options.configfile) # output our log to stdout or syslog options.sysloghostname = getConfig('sysloghostname', 'localhost', options.configfile) # syslog hostname diff --git a/cron/okta2mozdef.py b/cron/okta2mozdef.py index 27946cb7..74bc510f 100755 --- a/cron/okta2mozdef.py +++ b/cron/okta2mozdef.py @@ -157,7 +157,7 @@ def initConfig(): options.output=getConfig('output','stdout',options.configfile) #output our log to stdout or syslog options.sysloghostname=getConfig('sysloghostname','localhost',options.configfile) #syslog hostname options.syslogport=getConfig('syslogport',514,options.configfile) #syslog port - options.defaultTimeZone=getConfig('defaulttimezone','UTC',options.configfile) #default timezone + options.defaultTimeZone=getConfig('defaulttimezone','US/Pacific',options.configfile) #default timezone options.apikey=getConfig('apikey','',options.configfile) #okta api key to use options.oktadomain = getConfig('oktadomain', 'yourdomain.okta.com', options.configfile) #okta domain: something.okta.com options.esservers=list(getConfig('esservers','http://localhost:9200',options.configfile).split(',')) diff --git a/cron/relengComplianceNotices.py b/cron/relengComplianceNotices.py index 2019b3b5..fc67f699 100755 --- a/cron/relengComplianceNotices.py +++ b/cron/relengComplianceNotices.py @@ -40,7 +40,7 @@ def initLogger(): logger.addHandler(sh) -def toUTC(suspectedDate, localTimeZone="UTC"): +def toUTC(suspectedDate, localTimeZone="US/Pacific"): '''make a UTC date out of almost anything''' utc = pytz.UTC objDate = None @@ -157,7 +157,7 @@ def main(): def initConfig(): # change this to your default zone for when it's not specified - options.defaultTimeZone = getConfig('defaulttimezone', 'UTC', options.configfile) + options.defaultTimeZone = getConfig('defaulttimezone', 'US/Pacific', options.configfile) # logging settings options.output = getConfig('output', 'stdout', options.configfile) # output our log to stdout or syslog options.sysloghostname = getConfig('sysloghostname', 'localhost', options.configfile) # syslog hostname diff --git a/cron/syncAlertsToMongo.py b/cron/syncAlertsToMongo.py index 37def52d..b4a09a7a 100755 --- a/cron/syncAlertsToMongo.py +++ b/cron/syncAlertsToMongo.py @@ -109,7 +109,7 @@ def updateMongo(mozdefdb, esAlerts): mrecord['_id'] = genMeteorID() # capture the elastic search meta data (index/id/doctype) # set the date back to a datetime from unicode, so mongo/meteor can properly sort, select. - mrecord['utctimestamp']=toUTC(mrecord['utctimestamp'],'UTC') + mrecord['utctimestamp']=toUTC(mrecord['utctimestamp'],'US/Pacific') # also set an epoch time field so minimongo can sort mrecord['utcepoch'] = calendar.timegm(mrecord['utctimestamp'].utctimetuple()) mrecord['esmetadata'] = dict() @@ -136,7 +136,7 @@ def main(): def initConfig(): #change this to your default timezone - options.defaulttimezone=getConfig('defaulttimezone','UTC',options.configfile) + options.defaulttimezone=getConfig('defaulttimezone','US/Pacific',options.configfile) # output our log to stdout or syslog options.output = getConfig('output', 'stdout', options.configfile) # syslog hostname