Skip to content

Commit 581d156

Browse files
committed
Supervisor logs should now take the timezone into account.
1 parent e90e6a5 commit 581d156

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dogstream/supervisord_log.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
dogstreams: [path_to_supervisord.log]:datadog.streams.supervisord:parse_supervisord
77
88
"""
9-
import calendar
109
from datetime import datetime
10+
import time
1111
import re
1212

1313
EVENT_TYPE = "supervisor"
@@ -47,7 +47,7 @@ def parse_supervisord(log, line):
4747
timestamp_parts = timestamp.split(',')
4848
dt = datetime.strptime(timestamp_parts[0], "%Y-%m-%d %H:%M:%S")
4949
dt = dt.replace(microsecond=int(timestamp_parts[1]))
50-
date = calendar.timegm(dt.timetuple())
50+
date = time.mktime(dt.timetuple())
5151
event_type = line_items[2]
5252
msg = line_items[3]
5353
if msg is not None: msg = msg.strip()

0 commit comments

Comments
 (0)