Module: check_mk
Branch: master
Commit: 8d233b4c7ba15270f167fd449dd5aafc0b49e6b3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d233b4c7ba152…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 18 13:36:05 2015 +0100
win_os: Another fix for the datetime string parsing
---
inventory/win_os | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/inventory/win_os b/inventory/win_os
index 9e93a34..b720912 100644
--- a/inventory/win_os
+++ b/inventory/win_os
@@ -43,11 +43,13 @@ def inv_win_os(info):
if '+' in line[6]:
datestr, tz = line[6].split('+')
+ tz = int(tz)
elif '-' in line[6]:
datestr, tz = line[6].split('-')
+ tz = int(tz)*-1
else:
datestr, tz = line[6], 0
- node["install_date"] = int(time.mktime(time.strptime(datestr,
"%Y%m%d%H%M%S.%f"))) - int(tz)*60
+ node["install_date"] = int(time.mktime(time.strptime(datestr,
"%Y%m%d%H%M%S.%f"))) - tz*60
inv_info['win_os'] = {