Skip to content

Commit 3e0250c

Browse files
authored
Merge pull request #6 from eleven-software/update-format
Update Time format to include offset
2 parents c5ed1ca + e8d4b7a commit 3e0250c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

transform/eleven/eleven.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ func New() transform.Transformer {
2020

2121
timeFormat := os.Getenv(EnvTimeFormat)
2222
if timeFormat == "" {
23-
timeFormat = "2006-01-02T15:04:05.000Z"
23+
timeFormat = "2006-01-02T15:04:05.000Z07:00"
2424
}
2525

2626
return func(rec *types.Record) (*types.Record, error) {
2727
rec.Fields["product"] = product
2828
rec.Fields["component"] = component
2929

30-
formattedTime := rec.Time.Format(timeFormat)
30+
formattedTime := rec.Time.UTC().Format(timeFormat)
3131
rec.Fields["when"] = formattedTime
3232
return rec, nil
3333
}

0 commit comments

Comments
 (0)