diff --git a/src/saml2/time_util.py b/src/saml2/time_util.py index 81987ef..e0cc5d3 100644 --- a/src/saml2/time_util.py +++ b/src/saml2/time_util.py @@ -16,7 +16,7 @@ from datetime import datetime TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" TIME_FORMAT_WITH_FRAGMENT = re.compile( - "^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})\.\d*Z$") + "^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})(\.\d)*Z?$") # --------------------------------------------------------------------------- # I'm sure this is implemented somewhere else can't find it now though, so I