rpki.sundial.datetime Class Reference
Inherits
pydatetime::datetime.
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 45 of file sundial.py.
Member Function Documentation
def rpki.sundial.datetime.__add__ |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Force correct class for timedelta results.
Definition at line 126 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 136 of file sundial.py.
def rpki.sundial.datetime.earlier |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Return the earlier of two timestamps.
Definition at line 170 of file sundial.py.
def rpki.sundial.datetime.from_sql |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from SQL storage format.
Definition at line 147 of file sundial.py.
def rpki.sundial.datetime.fromASN1tuple |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 tuple representation.
Definition at line 77 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 119 of file sundial.py.
def rpki.sundial.datetime.fromGeneralizedTime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 GeneralizedTime.
Definition at line 68 of file sundial.py.
def rpki.sundial.datetime.fromUTCTime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from ASN.1 UTCTime.
Definition at line 59 of file sundial.py.
def rpki.sundial.datetime.fromXMLtime |
( |
|
cls, |
|
|
|
x | |
|
) |
| | |
Convert from XML time representation.
Definition at line 102 of file sundial.py.
def rpki.sundial.datetime.later |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
Return the later of two timestamps.
Definition at line 166 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 151 of file sundial.py.
def rpki.sundial.datetime.toASN1tuple |
( |
|
self |
) |
|
Convert to ASN.1 tuple representation.
Definition at line 92 of file sundial.py.
def rpki.sundial.datetime.toGeneralizedTime |
( |
|
self |
) |
|
Convert to ASN.1 GeneralizedTime.
Definition at line 72 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 51 of file sundial.py.
def rpki.sundial.datetime.toUTCTime |
( |
|
self |
) |
|
Convert to ASN.1 UTCTime.
Definition at line 63 of file sundial.py.
def rpki.sundial.datetime.toXMLtime |
( |
|
self |
) |
|
Convert to XML time representation.
Definition at line 111 of file sundial.py.
Member Data Documentation
Threshold specified in RFC 3280 for switchover from UTCTime to GeneralizedTime.
Definition at line 90 of file sundial.py.
The documentation for this class was generated from the following file: