From: Ed Ravin Date: Sat, 6 May 2017 02:53:59 +0000 (-0400) Subject: fix BIND timezone parsing issue X-Git-Tag: collectd-5.8.0~189^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=23963a8b9fae668376dd55917afbb38d759dd1d0;p=collectd.git fix BIND timezone parsing issue --- diff --git a/src/bind.c b/src/bind.c index 38761775..9d407d1a 100644 --- a/src/bind.c +++ b/src/bind.c @@ -429,7 +429,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);