Date column value is changed to browser time zone

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.

Please help on this .

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.

Maybe you can use logstash-date-filter and set the same timezone for everything.

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. :man_shrugging:. 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",
    ctx._source.logdate=new Date( new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").parse(ctx._source.logdate).getTime()+3600000)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.