Package ndg :: Package saml :: Package utils :: Class SAMLDateTime
[hide private]

Class SAMLDateTime

source code


Generic datetime formatting utility for SAML timestamps - XMLSchema Datetime format

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
basestring
toString(cls, dtValue)
Convert issue instant datetime to correct string type for output
source code
datetime.datetime
fromString(cls, strDateTime)
Convert issue instant string to datetime type
source code
Class Variables [hide private]
string DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S'
date/time format string for SAML timestamps
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

toString(cls, dtValue)
Class Method

source code 

Convert issue instant datetime to correct string type for output

Parameters:
  • dtValue (datetime.datetime) - issue instance as a datetime
Returns: basestring
issue instance as a string

fromString(cls, strDateTime)
Class Method

source code 

Convert issue instant string to datetime type

Parameters:
  • strDateTime (basestring) - issue instance as a string
Returns: datetime.datetime
issue instance as a datetime