[source, ruby]
----
response = client.ingest.put_pipeline(
  id: 'my-timestamp-pipeline',
  body: {
    description: 'Shifts the @timestamp to the last 15 minutes',
    processors: [
      {
        set: {
          field: 'ingest_time',
          value: '{{_ingest.timestamp}}'
        }
      },
      {
        script: {
          lang: 'painless',
          source: "\n          def delta = ChronoUnit.SECONDS.between(\n            ZonedDateTime.parse(\"2022-06-21T15:49:00Z\"),\n            ZonedDateTime.parse(ctx[\"ingest_time\"])\n          );\n          ctx[\"@timestamp\"] = ZonedDateTime.parse(ctx[\"@timestamp\"]).plus(delta,ChronoUnit.SECONDS).toString();\n        "
        }
      }
    ]
  }
)
puts response
----
