Logo Search packages:      
Sourcecode: zope-passwordresettool version File versions  Download package

def PasswordResetTool::PasswordResetTool::PasswordResetTool::expirationDate (   self  ) 

Returns a DateTime for exipiry of a request from the
current time.

This is used by housekeeping methods (like clearEpired)
and stored in reset request records.

Definition at line 279 of file PasswordResetTool.py.

00279                             :
        """Returns a DateTime for exipiry of a request from the
        current time.

        This is used by housekeeping methods (like clearEpired)
        and stored in reset request records."""
        if not hasattr(self, '_timedelta'):
            self._timedelta = 24
        try:
            if isinstance(self._timedelta,datetime.timedelta):
                expire = datetime.datetime.utcnow() + self._timedelta
                return DateTime(expire.year,
                                expire.month,
                                expire.day,
                                expire.hour,
                                expire.minute,
                                expire.second,
                                'UTC')
        except NameError:
            pass  # that's okay, it must be a number of hours...
        expire = time.time() + self._timedelta*3600  # 60 min/hr * 60 sec/min
        return DateTime(expire)

    security.declarePrivate('getValidUser')
    def getValidUser(self, userid):


Generated by  Doxygen 1.6.0   Back to index