fluent/fluentd · error · Fluent::ConfigError
Unsupported timezone '#{timezone}'
Error message
Unsupported timezone '#{timezone}' What it means
Fluent::ConfigError raised by Fluent::Timezone.validate! (lib/fluent/timezone.rb:92) when the timezone string does not pass format validation. Fluentd accepts only fixed-offset forms like +09:00, -0600, +0000 (and UTC) — named zones like 'Asia/Tokyo' and abbreviations like 'JST' or 'PST' are not supported because it formats offsets without a tz database.
Source
Thrown at lib/fluent/timezone.rb:92
return false
else
# Valid. The string was found in the timezone database.
return true
end
else
# Invalid. Timezone abbreviations are not supported.
return false
end
end
# Validate the format of the specified timezone.
#
# The implementation of this method calls validate(timezone) method
# to check whether the given timezone is valid. When invalid, this
# method raises a ConfigError.
def self.validate!(timezone)
unless validate(timezone)
raise ConfigError, "Unsupported timezone '#{timezone}'"
end
end
using IntegerExt
# Create a formatter for a timezone and optionally a format.
#
# An Proc object is returned. If the given timezone is invalid,
# nil is returned.
def self.formatter(timezone = nil, format = nil)
if timezone.nil?
return nil
end
# [+-]HH:MM, [+-]HHMM, [+-]HH
if NUMERIC_PATTERN === timezone
offset = Time.zone_offset(timezone)
View on GitHub (pinned to dd45c6e18d)
Solutions
- Replace the zone name/abbreviation with its fixed numeric offset, e.g. timezone Asia/Tokyo -> timezone +0900
- Use exactly the supported shapes: +HH:MM, -HH:MM, +HHMM, or UTC
- If records cross DST and need true zone awareness, convert times upstream or in a filter with tzinfo instead of the timezone option
Example fix
# before <parse> @type nginx time_format %d/%b/%Y:%H:%M:%S %z timezone Asia/Tokyo </parse> # after <parse> @type nginx time_format %d/%b/%Y:%H:%M:%S %z timezone +09:00 </parse>
Defensive patterns
Strategy: validation
Validate before calling
require 'fluent/timezone'
Fluent::Timezone.validate!('+09:00') # raises Fluent::ConfigError early if unsupported
# rule of thumb: only +HH:MM / -HH:MM / +HHMM / UTC pass; never zone names Prevention
- Use numeric fixed offsets only — IANA names and abbreviations are unsupported by design
- Centralize timezone strings in config templates so typos fail one dry-run, not in production
When it happens
Trigger: Setting timezone Asia/Tokyo or timezone JST in a parser/formatter or <system>; validate! runs during configuration (called from TimeParameters#configure at time.rb:184 and elsewhere), so fluentd fails at startup/dry-run. Passing a malformed offset like '+9' or '09:00' without sign also fails.
Common situations: Porting configs from libraries that accept IANA zone names; writing timezone UTC+9 instead of +0900; assuming DST-aware zones work (they cannot — fixed offsets only); typos in the offset string.
Related errors
- specifying timezone requires time format
- both of utc and localtime are specified, use only one of the
- invalid number of workers (must be 1 or unspecified) with --
- <system> is duplicated. <system> should be only one
- time_type is :mixed but time_format and time_format_fallback
AI-assisted analysis of fluent/fluentd@dd45c6e18d (2026-08-21).
Data as JSON: /api/errors/4c326df19320ab63.
Report an issue: GitHub.