From a95cd6eb55239a1a5dd555b9cb5b7a6163cb3495 Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Tue, 29 Apr 2025 10:22:39 +0200 Subject: [PATCH] fix --- interoperability/ocss/time.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/interoperability/ocss/time.go b/interoperability/ocss/time.go index 7cb077f..ac6ca53 100644 --- a/interoperability/ocss/time.go +++ b/interoperability/ocss/time.go @@ -22,9 +22,12 @@ func (v OCSSTime) MarshalBSONValue() (bsontype.Type, []byte, error) { return bson.MarshalValue(time.Time(v)) } -func (t OCSSTime) ToTime() time.Time { - time := time.Time(t) - return time +func (t *OCSSTime) ToTime() *time.Time { + if t == nil { + return nil + } + time := time.Time(*t) + return &time } func (t *OCSSTime) UnmarshalJSON(b []byte) error {