I have transfered data from my Sql server to elasticsearch index. There are 5 columns in which one is Date type name FirstCompleteDate . Additionaly I have got @timestamp column too.
Now when I import this data in my python code FirstCompleteDate value is exact what it is in Sql server But when I see it in Kibana FirstCompleteDate value is change to browser's time zone.
This change is causing me problem in visualizing the data.
When can change the timezone of Kibana in Management -> Advanced settings -> General -> Timezone for date formatting. By default it is set to browser, but you can change it at your will.
I already did it and It was working but I don't want it that way because I want @timestamp to same as of browser
Actually I have two index which actually are two different tables of Sql Server.
In one Date column is changed and in other remains same as in database.
Thanks @Miguel1 . But My data is correct in ElasticSearch index but it is showing difference in kibana.
Can I change timezone of a particular column in kibana ??
The only way it comes to my mind is using and scripted field and changing the timezone on the fly, but it doesn't sound like the best idea. . You can also use an ingest pipeline or an update by query to generate a new field. The script would be like something like this:
POST my_index/_update_by_query
{
"script": {
"lang": "painless",
"source":"""
ctx._source.logdate=new Date( new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").parse(ctx._source.logdate).getTime()+3600000)
"""
}
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.