From 9fb88917112051354cbb5553f7e29cef1411cdca Mon Sep 17 00:00:00 2001 From: Cole Kennedy Date: Tue, 2 Apr 2024 21:54:09 -0500 Subject: [PATCH] unmarshal the time in the attestation collection correctly (#203) fix/202/we now unmarshal the time in the attestation collection correctly Co-authored-by: Cole --- attestation/collection.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/attestation/collection.go b/attestation/collection.go index 9add8895..ab084e30 100644 --- a/attestation/collection.go +++ b/attestation/collection.go @@ -65,6 +65,8 @@ func (c *CollectionAttestation) UnmarshalJSON(data []byte) error { proposed := struct { Type string `json:"type"` Attestation json.RawMessage `json:"attestation"` + StartTime time.Time `json:"starttime"` + EndTime time.Time `json:"endtime"` }{} if err := json.Unmarshal(data, &proposed); err != nil { @@ -83,6 +85,8 @@ func (c *CollectionAttestation) UnmarshalJSON(data []byte) error { c.Type = proposed.Type c.Attestation = newAttest + c.StartTime = proposed.StartTime + c.EndTime = proposed.EndTime return nil }