diff --git a/interoperability/ocss/time.go b/interoperability/ocss/time.go index 6dc8cdc..7cb077f 100644 --- a/interoperability/ocss/time.go +++ b/interoperability/ocss/time.go @@ -55,3 +55,10 @@ func (t *OCSSTime) UnmarshalBSONValue(bt bsontype.Type, b []byte) error { *t = OCSSTime(datetime) return nil } + +func (t *OCSSTime) Format(format string) string { + if format == "" { + return "" + } + return t.ToTime().Format(format) +}