# CSV exported losing timezone setting

**URL:** https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004
**Category:** Kibana
**Created:** [April 22, 2021, 7:22pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004 "2021-04-22T19:22:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)
#### Post date: [April 22, 2021, 7:22pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/1 "2021-04-22T19:22:13Z")

</div>

Hi all,

Our kibana 7.12 started to show this behaviour (we are using Elastic Cloud).  
The dashboards show the timestamp formatted correctly as the Advanced Settings were chosen to be America/Sao\_Paulo.  
So the dashboard usually had a row with timestamp 15h00, and the JSON was in UTC (18h00). When we exported the CSV it came correctly as 15h00.

Now when we export the CSV it keeps with the UTC date.  
We already rebooted Kibana, and tried to change the timezone in the Advanced Settings to "Browser" and to "America/East" to see if there is any change, but the timestamp keeps showing in UTC when we export the CSV.

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [April 23, 2021, 9:33am UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/2 "2021-04-23T09:33:03Z")

</div>

Hi @marcosvrrs, could you post the exact steps to reproduce here? I tried to export a datatable from Dashboard to CSV, but it works correctly for me.

---

<div class="post-metadata">

### Author: ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)
#### Post date: [April 23, 2021, 3:11pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/3 "2021-04-23T15:11:18Z")

</div>

Hi @Marta_Bondyra , thanks for the reply!

So, first we have a dashboard like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/4/447c1ced60981a5c8b5f02688468c5c795f40993.png)

Then I go over the 3 dots, select more, and select "Download CSV" :

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/c/0ce95af3aca98b96d2ef3a107b1f9b609a3ea638.png)

And the exported CSV with the 3 hours difference:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd7e5979098cf6986f76d25ae8bc3fe0449443c1.png)

Sorry for the blurred images. Hope you can understand.

---

<div class="post-metadata">

### Author: ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)
#### Post date: [April 23, 2021, 3:31pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/4 "2021-04-23T15:31:08Z")

</div>

@Marta_Bondyra I tried with a saved search through discover, and the exact same thing happens. So, both ways the same issue shows.

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [April 23, 2021, 3:37pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/5 "2021-04-23T15:37:52Z")

</div>

Thanks, finally I was able to reproduce it in 7.12. Looks like it is fixed for the upcoming version 7.13, but I'll go through the list of our issues and see if we plan to merge a fix for 7.12.2.

---

<div class="post-metadata">

### Author: ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)
#### Post date: [April 23, 2021, 3:47pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/6 "2021-04-23T15:47:45Z")

</div>

@Marta_Bondyra thanks for the reply. When is this fix coming? Do you have an expected day of the release? It has broken a few scripts that are critical for our daily routines.

(this 7.12 version is so painful. We caught a MAJOR bug in the 7.12 few weeks ago and had our cluster offline until the elastic dev team fixed in 3 patches)

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [April 23, 2021, 4:52pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/7 "2021-04-23T16:52:26Z")

</div>

I'm really sorry to hear it!

Unfortunately, I cannot give you exact date of the release, but it will be released in about a month. Seeing how critical it is for you, I will try to advocate also for releasing this fix for 7.12.2 (which will happen much sooner).  
Sorry one more time and thank you for your patience.

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [April 26, 2021, 8:14am UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/8 "2021-04-26T08:14:48Z")

</div>

Hi @marcosvrrs,

I found out about workaround: in the index pattern, the date field needs explicit formatting as `date` .

1. Open the index pattern, find the date field
2. Click the pencil on the field row  
[![date formatting](https://us1.discourse-cdn.com/elastic/original/3X/8/2/825eec4ae545e15db9f316a812005f2ee0ce6f79.png)](https://user-images.githubusercontent.com/908371/112195457-38a4a880-8bc7-11eb-9624-8453eb01fc68.png)
3. Set format to Date  
[![date format 2](https://us1.discourse-cdn.com/elastic/original/3X/6/1/618f6a7f9950f5bd04a97379e093283200814c38.png)](https://user-images.githubusercontent.com/908371/112195505-45290100-8bc7-11eb-8e1a-f5b4e589c763.png)  
After setting the date format, the index pattern field list will show `Date` under the `Format` header, as shown in the first screenshot.
4. In the CSV export, this field will be formatted correctly and use the correct time zone:  
[![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2edeb35835942c011e1a49b4349d674f2a991c68.png)](https://user-images.githubusercontent.com/908371/112196055-dd26ea80-8bc7-11eb-8904-83d3f3b3b47d.png)

This is happening because the "default" field formats are not being applied due to a bug. Just like I mentioned, this will be fixed in 7.13 with [elastic/kibana#88303](https://github.com/elastic/kibana/pull/88303)

---

<div class="post-metadata">

### Author: ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)
#### Post date: [April 26, 2021, 3:12pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/9 "2021-04-26T15:12:11Z")

</div>

Hi @Marta_Bondyra, thanks for the workaround, it worked.  
Have a nice day! 😃

---

<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: [May 24, 2021, 3:12pm UTC](https://discuss.elastic.co/t/csv-exported-losing-timezone-setting/271004/10 "2021-05-24T15:12:27Z")

</div>

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