From: Sergey Matveev Date: Thu, 6 Feb 2020 13:18:32 +0000 (+0300) Subject: Explicitly mention that zero year is unsupported X-Git-Tag: 6.0~2 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=e7e62716431bd975d986be4528392502be156c9c Explicitly mention that zero year is unsupported --- diff --git a/pyderasn.py b/pyderasn.py index 9635e71..2e1180d 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -4301,6 +4301,10 @@ class GeneralizedTime(UTCTime): Only microsecond fractions are supported. :py:exc:`pyderasn.DecodeError` will be raised during decoding of higher precision values. + + .. warning:: + + Zero year is unsupported. """ __slots__ = () tag_default = tag_encode(24) @@ -4309,7 +4313,7 @@ class GeneralizedTime(UTCTime): def _strptime(self, value): l = len(value) if l == LEN_YYYYMMDDHHMMSSZ: - # datetime.strptime's format: %y%m%d%H%M%SZ + # datetime.strptime's format: %Y%m%d%H%M%SZ if value[-1] != "Z": raise ValueError("non UTC timezone") return datetime(