Problem in editing @timestamp through ingest pipeline

Hello there.

I've been trying to manipulate @timestamp through a script in a ingest pipeline (substract 8 hours). I tried referencing @timestamp using this syntax:

ctx._source['@timestamp'] = ctx._source['@timestamp'].minusHours(8);

I used these links to come up with a solution but had no luck yet.

Is there anything I've been missing? Any comment or idea would be much appreciated.

Is this to convert to some timezone? Because you could use the date processor to do that.

Thanks for your reply.
No actually I need to manipulate the timedate itself. It's not a timezone issue in this particular scenario.