Skip to content

Commit b727941

Browse files
committed
fix: delivery timestamp in unix second
1 parent 0401209 commit b727941

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/destregistry/basepublisher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (p *BasePublisher) StartClose() {
3737

3838
func (p *BasePublisher) MakeMetadata(event *models.Event, timestamp time.Time) map[string]string {
3939
systemMetadata := map[string]string{
40-
"timestamp": fmt.Sprintf("%d", timestamp.UnixMilli()),
40+
"timestamp": fmt.Sprintf("%d", timestamp.Unix()),
4141
"event-id": event.ID,
4242
"topic": event.Topic,
4343
}

internal/destregistry/providers/destwebhook/destwebhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ func (p *WebhookPublisher) Format(ctx context.Context, event *models.Event) (*ht
559559

560560
// Add default headers unless disabled
561561
if !p.disableTimestampHeader {
562-
req.Header.Set(p.headerPrefix+"timestamp", fmt.Sprintf("%d", now.UnixMilli()))
562+
req.Header.Set(p.headerPrefix+"timestamp", fmt.Sprintf("%d", now.Unix()))
563563
}
564564
if !p.disableEventIDHeader {
565565
req.Header.Set(p.headerPrefix+"event-id", event.ID)

0 commit comments

Comments
 (0)