Skip to content

Commit

Permalink
Merge pull request #965 from grzeg1/master
Browse files Browse the repository at this point in the history
Zabbix requires downtime timestamps to be integers.
  • Loading branch information
HenriWahl authored Sep 20, 2023
2 parents 1227802 + 2d07b74 commit cbde710
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Nagstamon/Servers/Zabbix.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,10 @@ def _set_downtime(self, hostname, service, author, comment, fixed, start_time, e
hostids = [self.hosts[hostname].hostid]

date = datetime.datetime.strptime(start_time, "%Y-%m-%d %H:%M")
stime = time.mktime(date.timetuple())
stime = int(time.mktime(date.timetuple()))

date = datetime.datetime.strptime(end_time, "%Y-%m-%d %H:%M")
etime = time.mktime(date.timetuple())
etime = int(time.mktime(date.timetuple()))

if conf.debug_mode is True:
self.Debug(server=self.get_name(),
Expand Down

0 comments on commit cbde710

Please sign in to comment.