fix BIND timezone parsing issue
authorEd Ravin <commitme@eravin.users.panix.com>
Sat, 6 May 2017 02:53:59 +0000 (22:53 -0400)
committerEd Ravin <commitme@eravin.users.panix.com>
Sat, 6 May 2017 02:53:59 +0000 (22:53 -0400)
src/bind.c

index 3876177..9d407d1 100644 (file)
@@ -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);