I have a field "time" which is saving as UTC into the Database. How Can i search the document with the timezone I need???
Ex:
//Saving in UTC into Database
{
"_index": "alertsfromsocketio",
"_type": "logs",
"_id": "AVyLyEC5O5j6WhAHI4qn",
"_score": 1,
"_source": {
"CUSTOMER": "TeleDNA",
"GROUP_NAME": "Testing",
"IP_ADDRESS": "172.16.23.14",
"LOCATION": "GEMS LAB",
"NODE_NAME": "Development",
"STATUS": "CPU USAGE IS 2",
"VENDOR_NAME": "TeleDNA",
"DETAIL1": "cpu",
"METRIC": "system.cpu.idle",
"PRODUCT_NAME": "smsc",
"VALUE": "2",
"ALARM_NAME": "CPU",
"level": "OK",
"TYPE": "monitor",
"time": "2017-06-09 07:36:13",
"gems": "Correctable"
}
}
//How Can I retrive it with +05.30 time zone
{
"_index": "alertsfromsocketio",
"_type": "logs",
"_id": "AVyLyEC5O5j6WhAHI4qn",
"_score": 1,
"_source": {
"CUSTOMER": "TeleDNA",
"GROUP_NAME": "Testing",
"IP_ADDRESS": "172.16.23.14",
"LOCATION": "GEMS LAB",
"NODE_NAME": "Development",
"STATUS": "CPU USAGE IS 2",
"VENDOR_NAME": "TeleDNA",
"DETAIL1": "cpu",
"METRIC": "system.cpu.idle",
"PRODUCT_NAME": "smsc",
"VALUE": "2",
"ALARM_NAME": "CPU",
"level": "OK",
"TYPE": "monitor",
"time": "2017-06-09 14:06:13",
"gems": "Correctable"
}
}
How to Query to get this type of result???