Skip to content

[pkg/ottl] Support for locale #32978

Closed as not planned
Closed as not planned
@michalpristas

Description

@michalpristas

Component(s)

pkg/ottl

Is your feature request related to a problem? Please describe.

When timestamp is in non-english language normal golang parsing will fail.

example:
when the tool i'm observing is producing Italian logs in a form of mercoledì set 4 2024 parsing with a layout Monday Jan 2 2006 should yield 4th September 2024 correctly

Describe the solution you'd like

Depending on #32977

DoD:

  • Add an ottl.Optional[string] argument to Time converter named locale.
  • Check locale is valid and we have a mapping for it at startup not in expression function
  • Date in non-english locales are parsed correctly
  • Support for different formats e.g stdLongWeekDay, stdWeekDay
  • Unit tests verifying known locales

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions