The timestamps produced with .isoformat() contain microseconds, in the idphandler.py and sphandler.py format_datetime functions. According to the specs [PDF] in section 1.3.3:
SAML system entities SHOULD NOT rely on time resolution finer than milliseconds.
(thanks Duo)
So should those functions use return value.strftime('%Y-%m-%dT%H:%M:%SZ') instead?