@property<EOL><INDENT>def asDateTime(self):<DEDENT>
text = str(self)<EOL>if text.endswith('<STR_LIT>'):<EOL><INDENT>tzinfo = TimeMixIn.UTC<EOL>text = text[:-<NUM_LIT:1>]<EOL><DEDENT>elif '<STR_LIT:->' in text or '<STR_LIT:+>' in text:<EOL><INDENT>if '<STR_LIT:+>' in text:<EOL><INDENT>text, plusminus, tz = string.partition(text, '<STR_LIT:+>')<EOL><DEDENT>else:<EOL><INDENT>text, plusminus, tz = string.partition(text, '<STR_LIT:->')<EOL><DEDENT>if self._shortTZ and len(tz) == <NUM_LIT:2>:<EOL><INDENT>tz += '<STR_LIT>'<EOL><DEDENT>if len(tz) != <NUM_LIT:4>:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % tz)<EOL><DEDENT>try:<EOL><INDENT>minutes = int(tz[:<NUM_LIT:2>]) * <NUM_LIT> + int(tz[<NUM_LIT:2>:])<EOL>if plusminus == '<STR_LIT:->':<EOL><INDENT>minutes *= -<NUM_LIT:1><EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % self)<EOL><DEDENT>tzinfo = TimeMixIn.FixedOffset(minutes, '<STR_LIT:?>')<EOL><DEDENT>else:<EOL><INDENT>tzinfo = None<EOL><DEDENT>if '<STR_LIT:.>' in text or '<STR_LIT:U+002C>' in text:<EOL><INDENT>if '<STR_LIT:.>' in text:<EOL><INDENT>text, _, ms = string.partition(text, '<STR_LIT:.>')<EOL><DEDENT>else:<EOL><INDENT>text, _, ms = string.partition(text, '<STR_LIT:U+002C>')<EOL><DEDENT>try:<EOL><INDENT>ms = int(ms) * <NUM_LIT:1000><EOL><DEDENT>except ValueError:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % self)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ms = <NUM_LIT:0><EOL><DEDENT>if self._optionalMinutes and len(text) - self._yearsDigits == <NUM_LIT:6>:<EOL><INDENT>text += '<STR_LIT>'<EOL><DEDENT>elif len(text) - self._yearsDigits == <NUM_LIT:8>:<EOL><INDENT>text += '<STR_LIT>'<EOL><DEDENT>try:<EOL><INDENT>dt = dateandtime.strptime(text, self._yearsDigits == <NUM_LIT:4> and '<STR_LIT>' or '<STR_LIT>')<EOL><DEDENT>except ValueError:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % self)<EOL><DEDENT>return dt.replace(microsecond=ms, tzinfo=tzinfo)<EOL>
Create :py:class:`datetime.datetime` object from a |ASN.1| object.

        Returns
        -------
        :
            new instance of :py:class:`datetime.datetime` object