Skip to content

ingest date processor parsing #51108

@fabide

Description

@fabide

Elasticsearch version: 7.4.2

JVM version : openjdk version "1.8.0_232"

OS version : 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
trying to parse a timestamp with iso8601 format. I expect @timestamp 2020-01-15T14:28:09.452+01:00 but it shows 2020-01-15T15:28:09.452+01:00.

Steps to reproduce:

curl -XPOST 'http://localhost:9200/_ingest/pipeline/_simulate' \
-h 'Content-Type: application/json' -d'{
  "pipeline": {
    "processors": [
      {
        "date": {
          "field": "timestamp",
          "timezone": "+0100",
          "formats": [ "ISO8601"]
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "timestamp": "2020-01-15T14:28:09,452"
      }
    }
    ]
}'

Result:

{
    "docs": [
        {
            "doc": {
                "_index": "_index",
                "_type": "_doc",
                "_id": "_id",
                "_source": {
                    "@timestamp": "2020-01-15T15:28:09.452+01:00",
                    "timestamp": "2020-01-15T14:28:09,452"
                },
                "_ingest": {
                    "timestamp": "2020-01-16T15:06:47.477281Z"
                }
            }
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions