No release in over 3 years
Fluentd filter plugin to shift the timezone of an event using the value of a field on that event.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 12.0

Runtime

>= 0.14.0, < 2
>= 0.3.6
 Project Readme

Timezone setter for Fluentd

Shift the timezone of an event using the value of a field on that event.

Installation

Use RubyGems:

gem install fluent-plugin-set-timezone

Configuration

There is only one option: timezone_key

<filter pattern>
  @type set_timezone
  timezone_key timezone
</filter>

It supports the record accessor syntax

A record like this:

["2016-11-03T15:58:09.138+03:00", {"msg":"hello!","timezone":"America/New_York"}]

will be transformed to:

["2016-11-03T15:58:09.138-05:00", {"msg":"hello!","timezone":"America/New_York"}]

Accepted formats are those parseable by tzinfo (i.e. the entire timezone DB), but also offsets parseable by Time.zone_offset(timezone) (meaning +0100 or -05:00).

It is highly recommended to use timezone names rather than offsets, because the actual offset is calculated using the offset of the zone at the given event time. This way daylight savings time (and the removal of it in e.g. the EU) is taken into account even in the hours around the change.

An invalid timezone raises an error. No timezone (nil or '') simply returns the existing time.