(self, value)
Decodes a timestamp string into a `DataObject` attribute (a Python
        `datetime` instance).

        Timestamp strings should be of in valid ISO-8601 format, such as
        ``YYYY-MM-DDTHH:MM:SSZ``,  The resulting `datetime` will have UTC
        tzinfo.
Decodes a timestamp string into a `DataObject` attribute (a Python
        `datetime` instance).
Decodes a timestamp string into a DataObject attribute ( a Python datetime instance ) .
def decode(self, value):
        """Decodes a timestamp string into a `DataObject` attribute (a Python
        `datetime` instance).

        Timestamp strings should be of in valid ISO-8601 format, such as
        ``YYYY-MM-DDTHH:MM:SSZ``,  The resulting `datetime` will have UTC
        tzinfo.
        """
        if value is None:
            if callable(self.default):
                return self.default()
            return self.default
        try:
            # Use dateutil to handle parsing and TZ conversion
            return dateutil.parser.parse(value).astimezone(Datetime.utc)
        except (TypeError, ValueError):
            raise TypeError('Value to decode %r is not a valid date time stamp' % (value,))
def decode ( self , value ) : if value is None : if callable ( self . default ) : return self . default ( ) return self . default try : # Use dateutil to handle parsing and TZ conversion return dateutil . parser . parse ( value ) . astimezone ( Datetime . utc ) except ( TypeError , ValueError ) : raise TypeError ( 'Value to decode %r is not a valid date time stamp' % ( value , ) )