rpki.sundial.datetime Class Reference
List of all members.
Detailed Description
RPKI extensions to standard datetime.datetime class. All work
here is in UTC, so we use naive datetime objects.
Definition at line 30 of file sundial.py.
Member Function Documentation
def rpki.sundial.datetime.__add__ |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Force correct class for timedelta results.
Definition at line 102 of file sundial.py.
def rpki.sundial.datetime.__str__ |
( |
|
self |
) |
|
def rpki.sundial.datetime.__sub__ |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Force correct class for timedelta results.
Definition at line 106 of file sundial.py.
def rpki.sundial.datetime.earlier |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Return the earlier of two timestamps.
Definition at line 133 of file sundial.py.
def rpki.sundial.datetime.from_sql |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from SQL storage format.
Definition at line 111 of file sundial.py.
def rpki.sundial.datetime.fromASN1tuple |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 tuple representation.
Definition at line 60 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 96 of file sundial.py.
def rpki.sundial.datetime.fromGeneralizedTime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 GeneralizedTime.
Definition at line 51 of file sundial.py.
def rpki.sundial.datetime.fromUTCTime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 UTCTime.
Definition at line 42 of file sundial.py.
def rpki.sundial.datetime.fromXMLtime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from XML time representation.
Definition at line 81 of file sundial.py.
def rpki.sundial.datetime.later |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Return the later of two timestamps.
Definition at line 129 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 115 of file sundial.py.
def rpki.sundial.datetime.toASN1tuple |
( |
|
self |
) |
|
Convert to ASN.1 tuple representation.
Definition at line 73 of file sundial.py.
def rpki.sundial.datetime.toGeneralizedTime |
( |
|
self |
) |
|
Convert to ASN.1 GeneralizedTime.
Definition at line 55 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 35 of file sundial.py.
def rpki.sundial.datetime.toUTCTime |
( |
|
self |
) |
|
Convert to ASN.1 UTCTime.
Definition at line 46 of file sundial.py.
def rpki.sundial.datetime.toXMLtime |
( |
|
self |
) |
|
Convert to XML time representation.
Definition at line 88 of file sundial.py.
Member Data Documentation
Threshold specified in RFC 3280 for switchover from UTCTime to GeneralizedTime.
Definition at line 71 of file sundial.py.
The documentation for this class was generated from the following file: