Apply timezone in date process pipeline based on a field

is it possible to apply timezone option on the date process pipeline based on _source field?
I was trying something like:
{
"date": {
"field": "system.auth.timestamp",
"formats": [
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
],
"timezone": "{{ _source.fields.timezone }}",
"ignore_failure": true,
"target_field": "@timestamp"
}

but elasticsearch reject my pipeline:{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "java.lang.IllegalArgumentException: The datetime zone id '{{ _source.fields.timezone }}' is not recognised",
"header": {
"processor_type": "date"
}
}
],
"type": "exception",
"reason": "java.lang.IllegalArgumentException: The datetime zone id '{{ _source.fields.timezone }}' is not recognised",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "The datetime zone id '{{ _source.fields.timezone }}' is not recognised"
},
"header": {
"processor_type": "date"
}
},
"status": 500
}

is there any way I can achieve this?

that field does not support scripting, but you could append he timezone to the timestamp field and then add a format, that supports parsing the timezone.

Would that work for you?

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