Module: check_mk
Branch: master
Commit: f553cf5785617d690048848cffae5e189a886d52
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f553cf5785617d…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Sep 25 15:41:35 2018 +0200
6608 FIX win_wmi_updates: Fixed parsing install date if reported in HEX format
Change-Id: I66462d14556a3b44c4f5015bbb221477c0b87f61
---
.werks/6608 | 10 ++++++++++
inventory/win_wmi_updates | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/6608 b/.werks/6608
new file mode 100644
index 0000000..d753dc1
--- /dev/null
+++ b/.werks/6608
@@ -0,0 +1,10 @@
+Title: win_wmi_updates: Fixed parsing install date if reported in HEX format
+Level: 1
+Component: inv
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1537882850
+Class: fix
+
+
diff --git a/inventory/win_wmi_updates b/inventory/win_wmi_updates
index 496c673..9c69e3b 100644
--- a/inventory/win_wmi_updates
+++ b/inventory/win_wmi_updates
@@ -54,7 +54,7 @@ def _parse_install_date(install_date_str):
# Contains a 64-bit value representing the number of 100-nanosecond intervals
# since January 1, 1601 (UTC).
try:
- return float(install_date_str, 16) / 10**7
+ return 1.0 * int(install_date_str, 16) / 10**7
except ValueError:
pass
return