Package pulp :: Package server :: Package auth :: Module certificate :: Class DateRange
[hide private]
[frames] | no frames]

Class DateRange

source code

Date range object converts between ASN1 and python datetime objects.

Instance Methods [hide private]
 
__init__(self, x509) source code
datetime.datetime
begin(self)
Get range beginning.
source code
datetime.datetime
end(self)
Get range end.
source code
boolean
hasNow(self)
Get whether the certificate is valid based on date.
source code
 
__parse(self, asn1) source code
 
__str__(self) source code
Class Variables [hide private]
  ASN1_FORMAT = '%b %d %H:%M:%S %Y %Z'
Instance Variables [hide private]
X509 x509
A certificate.
Method Details [hide private]

__init__(self, x509)
(Constructor)

source code 
Parameters:
  • x509 (X509) - A certificate.

begin(self)

source code 

Get range beginning.

Returns: datetime.datetime
The beginning date in UTC.

end(self)

source code 

Get range end.

Returns: datetime.datetime
The end date in UTC.

hasNow(self)

source code 

Get whether the certificate is valid based on date.

Returns: boolean
True if valid.