SAML-Toolkits / python3-saml

MIT License
682 stars 304 forks source link

Time data does not match format #289

Open maciekkrysz opened 2 years ago

maciekkrysz commented 2 years ago

Is there any option to handle datetime with this format? "time data 2021-12-02T14:15:13.277878+00:00 does not match format yyyy-mm-ddThh:mm:ss(\\.s+)?Z"

I got this saml response generated by flask-saml2 library

pitbulk commented 2 years ago

Format of accepted datetimes are defined at: https://github.com/onelogin/python3-saml/blob/master/src/onelogin/saml2/utils.py#L69

pitbulk commented 1 year ago

Hi @akx

I saw your commit https://github.com/akx/python3-saml/commit/e0241aba38b2da645745f6b75c7acd7dbf58ffe8

Can you include it in a way that we reuse the compat.py file and we use calendar when available so we don't break compatibility with python 2.7?