How to get the time of format YYYY-MM-dd_HH from @timestamp in output file block

Description

How to get the time of format YYYY-MM-dd_HH from @timestamp in output file block.What exactly i need is:
output {
file {
path => "/log_data/'YYYY-MM-dd_HH format time from @timestamp'.log"
}
}

I want to get the time from @timestamp but not to get the local time, and the local time is not the time in my timezone.

Assignee

Logstash Developers

Reporter

kong zhen hao

Labels

Affects versions

Configure