i am using the below range query to read data from elasticsearch using spark and in kibana i have set Asia/Riyadh Timezone for date formatting.
.set("es.query","""{
"query": {
"range": {
"@timestamp": {
"gte": "now-1h",
"lte": "now"
}
}
}
}""")
but this query is fetching me wrong results. while running this code the time was 10.49AM in Riyadh and i am getting the results from 6.52AM. below is my output.please help
Riyadh is UTC+3.
You ran the code at 10:49AM. Which means 7:49AM UTC.
You asked fro now-1H to now, which means from 06:49AM to 07:49AM.
The result looks good to me as 06:52AM is in this range.
1 Like
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.