fix BIND timezone parsing issue
[collectd.git] / src / bind.c
index c69c56d..597b90d 100644 (file)
@@ -433,7 +433,8 @@ static int bind_xml_read_timestamp(const char *xpath_expression, /* {{{ */
     return (-1);
   }
 
-  *ret_value = mktime(&tm);
+  tzset();
+  *ret_value = mktime(&tm) - timezone;  /* fix strptime() misinterpretation */
 
   xmlXPathFreeObject(xpathObj);
   return (0);