elastic / elastic/logstash

Allow setting the timezone for sprintf in Logstash event class

Open
#3,368 0 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

A regular problem that arises for users is that Logstash uses UTC time **everywhere**. Although this is suitable and usually highly desirable for timestamps, there are other places where using UTC doesn't make sense and leads to unexpected results for end-users.

One particular example is with the elasticsearch output plugin as discussed here:

https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/165

Allowing for example, an option to change the default timezone for everything but timestamps would result in a better experience for the end-user, many of whom expect the (in reference to the issue above) indexes to be rotated on local time rather than UTC and better integration with other tools/services on the server, like cron (and curator called through cron), which usually operate in local time.

The following branch seems to have the beginnings of a fix for this:

https://github.com/elastic/logstash/compare/elastic:master...talevy:sprintf-with-tz

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.