diff --git a/dockerplugin.py b/dockerplugin.py index c725b2e..7cf3b83 100755 --- a/dockerplugin.py +++ b/dockerplugin.py @@ -25,6 +25,7 @@ import dateutil.parser from distutils.version import StrictVersion +import calendar import docker import os import threading @@ -58,7 +59,7 @@ def emit(cls, container, type, value, t=None, type_instance=None): val.type_instance = type_instance if t: - val.time = time.mktime(dateutil.parser.parse(t).timetuple()) + val.time = calendar.timegm(dateutil.parser.parse(t).utctimetuple()) else: val.time = time.time()