:return: datetime object

def date(self):
        """:return: datetime object"""
        if self.commit_time:
            return datetime.utcfromtimestamp(self.commit_time)
        else:
            return datetime.now()