From fbcbdeb141474c760f878da309e892ee2b070c4f Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Thu, 7 Dec 2023 14:07:16 -0500 Subject: [PATCH] fix: created ts according to xml schema datetime spec Signed-off-by: Daniel Bluhm --- .../vc/ld_proofs/suites/bbs_bls_signature_2020.py | 4 +++- aries_cloudagent/vc/ld_proofs/suites/linked_data_signature.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_2020.py b/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_2020.py index 233661b88d..78a820e45f 100644 --- a/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_2020.py +++ b/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_2020.py @@ -63,7 +63,9 @@ async def create_proof( date = self.date or datetime.now(timezone.utc) if not date.tzinfo: date = utc.localize(date) - proof["created"] = date.isoformat() + proof["created"] = ( + date.replace(tzinfo=None).isoformat(timespec="seconds") + "Z" + ) # Allow purpose to update the proof; the `proof` is in the # SECURITY_CONTEXT_URL `@context` -- therefore the `purpose` must diff --git a/aries_cloudagent/vc/ld_proofs/suites/linked_data_signature.py b/aries_cloudagent/vc/ld_proofs/suites/linked_data_signature.py index a4547041be..4bca5b7edd 100644 --- a/aries_cloudagent/vc/ld_proofs/suites/linked_data_signature.py +++ b/aries_cloudagent/vc/ld_proofs/suites/linked_data_signature.py @@ -100,7 +100,9 @@ async def create_proof( date = self.date or datetime.now(timezone.utc) if not date.tzinfo: date = utc.localize(date) - proof["created"] = date.isoformat() + proof["created"] = ( + date.replace(tzinfo=None).isoformat(timespec="seconds") + "Z" + ) # Allow purpose to update the proof; the `proof` is in the # SECURITY_CONTEXT_URL `@context` -- therefore the `purpose` must