Multiple time zones for multiple fields in date processor

Hi all,

I'm indexing some data on elasticsearch, I have multiple fields of string and I'm trying to convert them to date type some of them are in local date and some others are in UTC date when I try to use "date" processor to convert these fields, the conversion succeeded but the time zone of all these fields was following the time zone used by the "@timestamp" field.

{
    "processors": [
     ...
      {
        "date": {
          "field": "date",
          "formats": [
            "yyyy-MM-dd HH:mm:ss"
          ],
          "timezone": "Europe/Paris"
        }
      },
      {
        "date": {
          "field": "date_loc",
          "target_field": "date_loc",
          "formats": [
            "yyyy-MM-dd HH:mm:ss"
          ],
          "timezone": "Europe/Paris"
        }
      },
      {
        "date": {
          "field": "date_utc",
          "target_field": "date_utc",
          "formats": [
            "yyyy-MM-dd HH:mm:ss"
          ]
        }
      }
      ...
    ]
}

On elasticserach documentation, it is mentioned that if the "timezone" field is not specified in "date" processor, time zone will be by default the UTC timezone but I tried to force this by adding the UTC time zone and other time zones that are different from my local time zone but in elasticsearch all the date type have the some time zone which is "Europe/Paris".

{
    "processors": [
     ...
      {
        "date": {
          "field": "date_utc",
          "target_field": "date_utc",
          "formats": [
            "yyyy-MM-dd HH:mm:ss"
          ],
          "timezone": "UTC" # I tried also "Africa/Abidjan" which is a UTC+00 time zone
        }
      }
      ...
    ]
}

Is it a bug or I'm missing something ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.