rpki.sundial.datetime Class Reference

Inherits pydatetime::datetime.

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 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 54 of file sundial.py.


Member Function Documentation

def rpki.sundial.datetime.__add__ (   x,
  y 
)

Definition at line 163 of file sundial.py.

def rpki.sundial.datetime.__radd__ (   x,
  y 
)

Definition at line 164 of file sundial.py.

def rpki.sundial.datetime.__rsub__ (   x,
  y 
)

Definition at line 165 of file sundial.py.

def rpki.sundial.datetime.__str__ (   self  ) 

Definition at line 124 of file sundial.py.

def rpki.sundial.datetime.__sub__ (   x,
  y 
)

Definition at line 166 of file sundial.py.

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

Definition at line 159 of file sundial.py.

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

Definition at line 136 of file sundial.py.

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

Definition at line 86 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 128 of file sundial.py.

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

Definition at line 77 of file sundial.py.

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

Definition at line 68 of file sundial.py.

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

Definition at line 111 of file sundial.py.

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

Definition at line 155 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 140 of file sundial.py.

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

Definition at line 101 of file sundial.py.

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

Definition at line 81 of file sundial.py.

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 60 of file sundial.py.

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

Definition at line 72 of file sundial.py.

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

Definition at line 120 of file sundial.py.


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 99 of file sundial.py.


The documentation for this class was generated from the following file:

Generated on Tue Jan 12 07:56:03 2010 for RPKI Engine by  doxygen 1.6.1