collecty records all data in UTC and writes them to the database
in UTC as well. When the system uses a different timezone the database
"corrects" the timestamps what we don't want here. Hence we force
resetting the timezone to UTC.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
import datetime
import multiprocessing
import datetime
import multiprocessing
import queue
import rrdtool
import signal
import queue
import rrdtool
import signal
def __init__(self, debug=False):
self.debug = debug
def __init__(self, debug=False):
self.debug = debug
+ # Reset timezone to UTC
+ # rrdtool is reading that from the environment
+ os.environ["TZ"] = "UTC"
+
# Enable debug logging when running in debug mode
if self.debug:
log.setLevel(logging.DEBUG)
# Enable debug logging when running in debug mode
if self.debug:
log.setLevel(logging.DEBUG)