diff --git a/v2/binding/to_event.go b/v2/binding/to_event.go index 1c73b3c5b..d3332c158 100644 --- a/v2/binding/to_event.go +++ b/v2/binding/to_event.go @@ -12,7 +12,6 @@ import ( "errors" "fmt" "io" - "time" "github.com/cloudevents/sdk-go/v2/binding/format" "github.com/cloudevents/sdk-go/v2/binding/spec" @@ -139,16 +138,6 @@ func (b *messageToEventBuilder) SetAttribute(attribute spec.Attribute, value int } return nil } - - // Check if the attribute is 'time' and set it correctly - if attribute.Kind() == spec.Time { - t, ok := value.(time.Time) - if !ok { - return fmt.Errorf("expected time.Time for 'time' attribute, got %T", value) - } - return attribute.Set(b.Context, t) - } - return attribute.Set(b.Context, value) }