def _update_time(self, session):
     td = datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)
     td = td.microseconds / 1000 + (td.seconds + td.days * 86400) * 1000
     td = int(td)
     self.fire(portal_update(self, session, "new_time", str(td)), \
               self._portal_channel)
 def update(self, portlet, *args, **kwargs):
     portlet.fire(portal_update(portlet, self._session, *args, **kwargs), \
                  self._portal.channel)
Ejemplo n.º 3
0
 def _update_time(self, session):
     td = datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)
     td = td.microseconds / 1000 + (td.seconds + td.days * 86400) * 1000
     td = int(td)
     self.fire(portal_update(self, session, "new_time", str(td)), \
               self._portal_channel)