Skip to content

Commit

Permalink
x-pack/filebeat/input/cel: make now evaluate to a time in UTC (#37159) (
Browse files Browse the repository at this point in the history
#37163)

now() and the mito now global both evaluate as times in UTC. The
per-period now global of the input should as well.

(cherry picked from commit c438382)

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
  • Loading branch information
mergify[bot] and efd6 authored Nov 21, 2023
1 parent c7d3709 commit 63eea5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix Filebeat Cisco module with missing escape character {issue}36325[36325] {pull}36326[36326]
- Do not error when Okta API returns no data. {pull}37092[37092]
- Fix request body close behaviour in HTTP_Endpoint when handling GZIP compressed content. {pull}37091[37091]
- Make CEL input now global evaluate to a time in UTC. {pull}37159[37159]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/cel/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (i input) run(env v2.Context, src *source, cursor map[string]interface{}, p
// Process a set of event requests.
log.Debugw("request state", logp.Namespace("cel"), "state", redactor{state: state, cfg: cfg.Redact})
metrics.executions.Add(1)
start := i.now()
start := i.now().In(time.UTC)
state, err = evalWith(ctx, prg, state, start)
log.Debugw("response state", logp.Namespace("cel"), "state", redactor{state: state, cfg: cfg.Redact})
if err != nil {
Expand Down

0 comments on commit 63eea5c

Please sign in to comment.