mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-31 12:04:24 +01:00
the UTC timestamp returned by nowUnix() was skewed by DST
git-svn-id: https://kippo.googlecode.com/svn/trunk@126 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
|
||||
# See the COPYRIGHT file for more information
|
||||
|
||||
import re, time, datetime, socket
|
||||
import re, time, socket
|
||||
|
||||
class DBLogger(object):
|
||||
def __init__(self, cfg):
|
||||
@@ -40,7 +40,7 @@ class DBLogger(object):
|
||||
|
||||
def nowUnix(self):
|
||||
"""return the current UTC time as an UNIX timestamp"""
|
||||
return int(time.mktime(datetime.datetime.utcnow().utctimetuple()))
|
||||
return int(time.mktime(time.gmtime()[:-1] + (-1,)))
|
||||
|
||||
def emit(self, ev):
|
||||
if not len(ev['message']):
|
||||
|
||||
Reference in New Issue
Block a user