From e83df73c8da41f90a090dc0ceed083e3ab95a504f72e206dd842226259a18564 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 21 Nov 2024 11:25:34 +0300 Subject: [PATCH] Zero nsecs is ok for TAI64NA --- pyac/pyac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyac/pyac.py b/pyac/pyac.py index 92f0ec4..670d88a 100755 --- a/pyac/pyac.py +++ b/pyac/pyac.py @@ -298,7 +298,7 @@ def loads(v, sets=False, leapsecUTCAllow=False): nsecs = 0 if l > 8: nsecs = int.from_bytes(v[1+8:1+8+4], "big") - if nsecs == 0: + if (l == 8) and (nsecs == 0): raise DecodeError("non-minimal encoding") if nsecs > 999999999: raise DecodeError("too many nanoseconds") -- 2.50.0