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


Member Function Documentation

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

Definition at line 192 of file sundial.py.

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

Definition at line 193 of file sundial.py.

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

Definition at line 194 of file sundial.py.

def rpki.sundial.datetime.__str__ (   self)

Definition at line 137 of file sundial.py.

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

Definition at line 195 of file sundial.py.

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

Definition at line 186 of file sundial.py.

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

Definition at line 159 of file sundial.py.

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

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

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

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

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

Definition at line 70 of file sundial.py.

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

Definition at line 122 of file sundial.py.

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

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

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

Definition at line 112 of file sundial.py.

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

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

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

Definition at line 77 of file sundial.py.

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

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


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