def serialize(self):
        """This function serialize into a simple dict object.
        It is used when transferring data to other daemons over the network (http)

        Here we directly return all attributes

        :return: json representation of a Timeperiod
        :rtype: dict
        """
        res = super(Timeperiod, self).serialize()

        res['dateranges'] = []
        for elem in self.dateranges:
            res['dateranges'].append({'__sys_python_module__': "%s.%s" % (elem.__module__,
                                                                          elem.__class__.__name__),
                                      'content': elem.serialize()})

        return res