elastic / elastic/logstash

Support Locale for date parsing in sprintf format

Open
#2,315 10 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

When parsing a date with `sprintf`, we use by default the local `Locale`.

For example:

```
mutate {
replace => { "message" => "%{start}[%{+dd/MMM/YYYY:HH:mm:ss Z}]%{end}" }
}
```

could produce something different when running on a french computer than on an english computer: `14/déc./2014:00:13:42 +0000` vs `14/Dec/2014:00:13:42 +0000`.

It could be nice to specify for a date the Locale we want to use whatever is set on the computer.

`%{+LOCALE@DATE_FORMAT}` such as:

```
mutate {
replace => { "message" => "%{start}[%{+fr@dd/MMM/YYYY:HH:mm:ss Z}]%{end}" }
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.