Exemple #1
0
    def laststatuschange(self, returntimesincenow=True):
        lastchange = max(self.services, key=lambda x: x.laststatuschange(returntimesincenow=False)). \
                        laststatuschange(returntimesincenow=False)

        if returntimesincenow:
            return getnicetimefromdatetime(lastchange)
        else:
            return lastchange
Exemple #2
0
    def laststatuschange(self, returntimesincenow=True):
        lastchange = max(self.services, key=lambda x: x.laststatuschange(returntimesincenow=False)). \
                        laststatuschange(returntimesincenow=False)

        if returntimesincenow:
            return getnicetimefromdatetime(lastchange)
        else:
            return lastchange
Exemple #3
0
    def laststatuschange(self, returntimesincenow=True, timestamp=None):
        if timestamp:
            lastchange = datetime.fromtimestamp(float(timestamp))
        else:
            lastchange = datetime.fromtimestamp(float(self.last_state_change))

        if returntimesincenow:
            return getnicetimefromdatetime(lastchange)
        else:
            return lastchange
Exemple #4
0
    def laststatuschange(self, returntimesincenow=True, timestamp=None):
        if timestamp:
            lastchange = datetime.fromtimestamp(float(timestamp))
        else:
            lastchange = datetime.fromtimestamp(float(self.last_state_change))

        if returntimesincenow:
            return getnicetimefromdatetime(lastchange)
        else:
            return lastchange