Given timestamp in UTC format in elasticsearch documents.
The week day and hour of the day aggregations can be retrieved using inline scripts eg.
"script": {
"lang": "painless",
"inline": "doc['eventTime'].date.dayOfWeek"
}
From above weekDay buckets will be evaluated on the basis of UTC time.
Ques: How can we get the week day buckets in other timezone ? eg. Asia/Singapore timezone from UTC timezone.