]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
Explicitly mention that zero year is unsupported
authorSergey Matveev <stargrave@stargrave.org>
Thu, 6 Feb 2020 13:18:32 +0000 (16:18 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 6 Feb 2020 13:36:51 +0000 (16:36 +0300)
pyderasn.py

index 9635e71d70de0e89474fb8a958b0bfe10dd13dbb..2e1180d1be74014a8638620a2c1973d57883545c 100755 (executable)
@@ -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(