{"record":{"id":"3b075508b80c8f95","repo":"fluent/fluentd","slug":"invalid-time-format-value-value-even-though","errorCode":null,"errorMessage":"invalid time format: value = #{value}, even though fallbacks: #{fallback_class}","messagePattern":"invalid time format: value = #(.+?), even though fallbacks: #(.+?)","errorType":"exception","errorClass":"Fluent::TimeParser::TimeParseError","httpStatus":null,"severity":"error","filePath":"lib/fluent/time.rb","lineNumber":511,"sourceCode":"        end\n      end\n    end\n\n    def parse(value)\n      @parsers.each do |parser|\n        begin\n          Float(value) if parser.class == Fluent::NumericTimeParser\n        rescue\n          next\n        end\n        begin\n          return parser.parse(value)\n        rescue\n          # skip TimeParseError\n        end\n      end\n      fallback_class = @parsers.collect do |parser| parser.class end.join(\",\")\n      raise TimeParseError, \"invalid time format: value = #{value}, even though fallbacks: #{fallback_class}\"\n    end\n  end\n\nend\n","sourceCodeStart":493,"sourceCodeEnd":516,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/time.rb#L493-L516","documentation":"Fluent::TimeParseError raised by MixedTimeParser#parse (lib/fluent/time.rb:511) when the value could not be parsed by ANY of the configured parsers — the primary time_format plus every entry in time_format_fallbacks. The message lists the parser classes that were tried (e.g. Fluent::TimeParser,Fluent::NumericTimeParser), so you can see what 'mixed' actually attempted.","triggerScenarios":"time_type mixed with formats like %iso8601 + unixtime, and a record whose time field matches none: '20-Aug-2021 (JST)' or a null-in-a-string 'null', or a non-string value that fails the Float() pre-check for the numeric parsers. Each parser's TimeParseError is swallowed and only this final error surfaces.","commonSituations":"A new service ships a third timestamp style not yet in the fallbacks list; a locale-format date (DD/MM vs MM/DD ambiguity) not covered; producer sends 'null'/empty string for missing timestamps; fallbacks list has a typo (e.g. %iso8601 misspelled) so nothing can ever match.","solutions":["Take the exact failing value from the message and add a matching format to time_format_fallbacks (verify with Time.strptime in irb)","For epoch-numeric fields ensure 'unixtime' or 'float' is in the fallbacks so NumericTimeParser gets tried","Drop or reroute records with missing/blank time fields before the parser (grep/record_accessor filter) instead of relying on mixed to absorb them","Check the fallback_class list in the message — if it shows fewer parsers than you configured, a fallback name is misspelled and was skipped"],"exampleFix":"# before\ntime_type mixed\ntime_format %iso8601\ntime_format_fallbacks unixtime\n# value '20/Aug/2021:12:00:00 +0900' fails both\n\n# after\ntime_type mixed\ntime_format %iso8601\ntime_format_fallbacks unixtime, %d/%b/%Y:%H:%M:%S %z","handlingStrategy":"try-catch","validationCode":"# verify every candidate value parses with at least one configured format:\nrequire 'time'\nformats = ['%iso8601']\nfallbacks = ['unixtime']\ndef parse_ok?(v, formats, fallbacks)\n  (formats + fallbacks).any? do |f|\n    if %w[unixtime float].include?(f)\n      Float(v, exception: false)\n    else\n      begin; Time.strptime(v, f); true; rescue; false; end\n    end\n  end\nend","typeGuard":"def mixed_parsable?(value)\n  value.is_a?(String) && !value.to_s.empty? && !['null', 'nil'].include?(value.strip)\nend","tryCatchPattern":"begin\n  time = mixed_parser.parse(value)\nrescue Fluent::TimeParseError => e\n  router.emit('app.unparsable', Fluent::Engine.now, record)  # quarantine\nend","preventionTips":["Track every timestamp format producers emit and mirror them in time_format_fallbacks","Dry-run new formats in irb with Time.strptime before adding to config","Quarantine unparsable records to a dead-letter tag instead of letting errors propagate"],"tags":["fluentd","time","mixed-parser","time-format","runtime"],"backgroundTag":"datetime-parse-failed","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}