# Date column value is changed to browser time zone

**URL:** <https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223>\
**Category:** Kibana\
**Created:** [July 1, 2019, 4:24am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223 "2019-07-01T04:24:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)\
**Post date:** [July 1, 2019, 4:24am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/1 "2019-07-01T04:24:52Z")

</div>

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 .  
Thanks

---

<div class="post-metadata">

**Author:** ![Miguel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel1/32/82094_2.png) [@Miguel1](https://discuss.elastic.co/u/Miguel1)\
**Post date:** [July 1, 2019, 8:35am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/2 "2019-07-01T08:35:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)\
**Post date:** [July 1, 2019, 9:13am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/3 "2019-07-01T09:13:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Miguel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel1/32/82094_2.png) [@Miguel1](https://discuss.elastic.co/u/Miguel1)\
**Post date:** [July 1, 2019, 9:18am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/4 "2019-07-01T09:18:55Z")

</div>

Maybe you can use [logstash-date-filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-timezone) and set the same timezone for everything.

---

<div class="post-metadata">

**Author:** ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)\
**Post date:** [July 1, 2019, 10:40am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/5 "2019-07-01T10:40:34Z")

</div>

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 ??

---

<div class="post-metadata">

**Author:** ![Miguel1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguel1/32/82094_2.png) [@Miguel1](https://discuss.elastic.co/u/Miguel1)\
**Post date:** [July 1, 2019, 11:05am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/6 "2019-07-01T11:05:52Z")

</div>

The only way it comes to my mind is using and [scripted field](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) 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:

```auto
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)
    """
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 29, 2019, 11:05am UTC](https://discuss.elastic.co/t/date-column-value-is-changed-to-browser-time-zone/188223/7 "2019-07-29T11:05:55Z")

</div>

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