Commit fc72bf27 authored by Ad Schellevis's avatar Ad Schellevis

(network insight) utc in get_timeseries.py

parent 0468bfd1
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
""" """
import time import time
import datetime import datetime
import calendar
import os import os
import sys import sys
import ujson import ujson
...@@ -78,7 +79,7 @@ if valid_params: ...@@ -78,7 +79,7 @@ if valid_params:
else: else:
record_key.append('') record_key.append('')
record_key = ','.join(record_key) record_key = ','.join(record_key)
start_time_stamp = time.mktime(record['start_time'].timetuple()) start_time_stamp = calendar.timegm(record['start_time'].timetuple())
if start_time_stamp not in timeseries: if start_time_stamp not in timeseries:
timeseries[start_time_stamp] = dict() timeseries[start_time_stamp] = dict()
timeseries[start_time_stamp][record_key] = {'octets': record['octets'], timeseries[start_time_stamp][record_key] = {'octets': record['octets'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment