diff --git a/attributs.py b/attributs.py index 502f774..a58de83 100644 --- a/attributs.py +++ b/attributs.py @@ -626,9 +626,15 @@ class generalizedTimeFormat(Attr): def __eq__(self, othertime): if isinstance(othertime, generalizedTimeFormat): return self._stamp == othertime._stamp - else: + elif isinstance(othertime, float): + return self._stamp == othertime + elif isinstance(othertime, int): + return self._stamp == othertime + elif isinstance(othertime, unicode) or isinstance(othertime, str): resource = generalizedTimeFormat(othertime, conn=None, Parent=None) return self._stamp == resource._stamp + else: + return False def __neq__(self, othertime): return not (self == othertime)