Example #1
0
 def __init__(self, log_node):
     LogObjectInfo.__init__(self, log_node)
     self.configuration = log_node.configuration()
     self.current_timestamp = time.time()
     self.tzinfo_range = get_tzinfo_range(LocalTZInfo,
                                          self.first_record['timestamp'],
                                          (self.last_record['timestamp']+
                                           LocalTZInfo.YEAR+
                                           LocalTZInfo.DAY+1))
     return
Example #2
0
 def as_dict(self):
     result = LogObjectInfo.as_dict(self)
     for attr in ('configuration', 'current_timestamp'):
         result[attr] = getattr(self,attr)
     result['tzinfo_range'] = map(lambda tzi: tzi.as_dict(),
                                  self.tzinfo_range)
     return result