RPKI Engine  1.0
Public Member Functions | Static Public Attributes
rpki::sundial::datetime Class Reference
Inheritance diagram for rpki::sundial::datetime:
Inheritance graph
Collaboration diagram for rpki::sundial::datetime:
Collaboration graph

List of all members.

Public Member Functions

def __add__
def __radd__
def __rsub__
def __str__
def __sub__
def earlier
def from_sql
def fromASN1tuple
def fromdatetime
def fromGeneralizedTime
def fromOpenSSL
def fromUTCTime
def fromXMLtime
def later
def to_sql
def toASN1tuple
def toGeneralizedTime
def totimestamp
def toUTCTime
def toXMLtime

Static Public Attributes

tuple PKIX_threshhold = pydatetime.datetime(2050, 1, 1)
 Threshold specified in RFC 3280 for switchover from UTCTime to GeneralizedTime.

Detailed Description

RPKI extensions to standard datetime.datetime class.  All work here
is in UTC, so we use naive datetime objects.

Definition at line 61 of file sundial.py.


Member Function Documentation

def rpki::sundial::datetime::__add__ (   self,
  y 
)

Definition at line 197 of file sundial.py.

def rpki::sundial::datetime::__radd__ (   self,
  y 
)

Definition at line 198 of file sundial.py.

def rpki::sundial::datetime::__rsub__ (   self,
  y 
)

Definition at line 199 of file sundial.py.

def rpki::sundial::datetime::__str__ (   self)

Definition at line 142 of file sundial.py.

References toXMLtime().

Here is the call graph for this function:

def rpki::sundial::datetime::__sub__ (   self,
  y 
)

Definition at line 200 of file sundial.py.

def rpki::sundial::datetime::earlier (   self,
  other 
)
Return the earlier of two timestamps.

Definition at line 191 of file sundial.py.

def rpki::sundial::datetime::from_sql (   cls,
  x 
)
Convert from SQL storage format.

Definition at line 164 of file sundial.py.

def rpki::sundial::datetime::fromASN1tuple (   cls,
  x 
)
Convert from ASN.1 tuple representation.

Definition at line 102 of file sundial.py.

def rpki::sundial::datetime::fromdatetime (   cls,
  x 
)
Convert a datetime.datetime object into this subclass.  This is
whacky due to the weird constructors for datetime.

Definition at line 146 of file sundial.py.

def rpki::sundial::datetime::fromGeneralizedTime (   cls,
  x 
)
Convert from ASN.1 GeneralizedTime.

Definition at line 89 of file sundial.py.

def rpki::sundial::datetime::fromOpenSSL (   cls,
  x 
)
Convert from the format OpenSSL's command line tool uses into this
subclass.  May require rewriting if we run into locale problems.

Definition at line 154 of file sundial.py.

def rpki::sundial::datetime::fromUTCTime (   cls,
  x 
)
Convert from ASN.1 UTCTime.

Definition at line 75 of file sundial.py.

def rpki::sundial::datetime::fromXMLtime (   cls,
  x 
)
Convert from XML time representation.

Definition at line 127 of file sundial.py.

def rpki::sundial::datetime::later (   self,
  other 
)
Return the later of two timestamps.

Definition at line 185 of file sundial.py.

def rpki::sundial::datetime::to_sql (   self)
Convert to SQL storage format.

There's something whacky going on in the MySQLdb module, it throws
range errors when storing a derived type into a DATETIME column.
Investigate some day, but for now brute force this by copying the
relevant fields into a datetime.datetime for MySQLdb's
consumption.

Definition at line 170 of file sundial.py.

def rpki::sundial::datetime::toASN1tuple (   self)
Convert to ASN.1 tuple representation.

Definition at line 117 of file sundial.py.

References PKIX_threshhold, toGeneralizedTime(), and toUTCTime().

Here is the call graph for this function:

def rpki::sundial::datetime::toGeneralizedTime (   self)
Convert to ASN.1 GeneralizedTime.

Definition at line 95 of file sundial.py.

Referenced by toASN1tuple().

Here is the caller graph for this function:

def rpki::sundial::datetime::totimestamp (   self)
Convert to seconds from epoch (like time.time()).  Conversion
method is a bit silly, but avoids time module timezone whackiness.

Definition at line 67 of file sundial.py.

def rpki::sundial::datetime::toUTCTime (   self)
Convert to ASN.1 UTCTime.

Definition at line 82 of file sundial.py.

Referenced by toASN1tuple().

Here is the caller graph for this function:

def rpki::sundial::datetime::toXMLtime (   self)
Convert to XML time representation.

Definition at line 136 of file sundial.py.

Referenced by __str__().

Here is the caller graph for this function:


Member Data Documentation

rpki::sundial::datetime::PKIX_threshhold = pydatetime.datetime(2050, 1, 1) [static]

Threshold specified in RFC 3280 for switchover from UTCTime to GeneralizedTime.

Definition at line 115 of file sundial.py.

Referenced by toASN1tuple().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties