Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Timezone not being considered when exporting CSV files from discovery if dateFormat:tz is Browser #56497

Closed
crisdarocha opened this issue Jan 31, 2020 · 6 comments
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead

Comments

@crisdarocha
Copy link

Kibana version: 7.5.2

Elasticsearch version: 7.5.2

Server OS version: ESS

Browser version: Chrome 79.0.3945.130

Browser OS version: MacOS 10.14.6

Original install method (e.g. download page, yum, from source, etc.): ESS

Describe the bug: When exporting a CSV report from Discover, if dateFormat:tz is set to Browser (the default value), @timestamp comes in UTC, ignoring the browser's timezone.

If dateFormat:tz is set to given timezone, e.g. Europe/Berlin the value of @timestamp takes in consideration the timezone (GMT+1 in the example).

Basically Browser doesn't pass the timezone information to the Kibana server, while defining a timezone does pass this information.

Steps to reproduce:

  1. In a browser not in GMT+0, Kibana set to dateFormat:tz = Browser go to Discover and export a CSV report.
  2. @timestamp will be in UTC
  3. Change dateFormat:tz to your timezone and repeat the export.
  4. @timestamp will be in your timezone.

Expected behavior: Using the default setting Browser or setting to your timezone, should return @timestamp in the user's timezone, not UTC.

@crisdarocha crisdarocha added bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels Jan 31, 2020
@tsullivan
Copy link
Member

Hi, this bug was fixed in https://github.com/elastic/kibana/pull/67027/files#diff-9e58a3361ab5c8712a56a03f7946dd2f940a8c037b30a06cfa8f16e15376e34bR46 and the fix is set to be released in 7.10.

If a valid Timezone is in the Advanced Setting, that will be used. If Browser is set, we detect the user's timezone and pass it in the job params.

@romain-chanu
Copy link

@tsullivan

Hi, this bug was fixed in https://github.com/elastic/kibana/pull/67027/files#diff-9e58a3361ab5c8712a56a03f7946dd2f940a8c037b30a06cfa8f16e15376e34bR46 and the fix is set to be released in 7.10.

This was actually fixed in 7.9.0 (c.f label from #67027).

@bsp003
Copy link

bsp003 commented May 19, 2021

@tsullivan @romain-chanu This isn't working for me.

Version : 7.12.1
Chrome Version : 81.0.4044.138 (Official Build) (64-bit)
OS : Ubuntu

Installation via deb package.

Bug description : Even though dateFormat:tz is set to Asia/Calcutta or Asia/Kolkata the display of time only changes on the dashboard but while downloading the CSV the value of timestamp is converted to UTC and appended with Z.
CSV download is tried on a search table.

Expected Behavior : CSV download should have value of timestamp based on timezone selected under dateFormat:tz.

Attaching screenshot of Kibana setting and version.
Screenshot

Any help appreciated!

@tsullivan
Copy link
Member

Hi @bsp003 you might unfortunately be hitting bug where the date format is not automatically get picked up when generating the CSV, so the date is shown as a plain text string.

There is a workaround to get this working which is to update the Index Pattern you have with this data, and change the format of the date column from Default to Date.

wrong: date using default format:
image

right: date format set to Date:
image

CSV Export was re-written in 7.13, with one of the effects being that this workaround will no longer be needed

@bsp003
Copy link

bsp003 commented May 19, 2021

@tsullivan Thanks for the rocket response. It worked!

@nerophon
Copy link
Contributor

nerophon commented Jun 7, 2021

@tsullivan

Hi, this bug was fixed in https://github.com/elastic/kibana/pull/67027/files#diff-9e58a3361ab5c8712a56a03f7946dd2f940a8c037b30a06cfa8f16e15376e34bR46 and the fix is set to be released in 7.10.

This was actually fixed in 7.9.0 (c.f label from #67027).

FYI, a user encountered the bug in 7.9.0, but can't reproduce it any longer in 7.10.2. This isn't extremely relevant anymore, but for anyone in the future reading this please be aware that there is some ambiguity here. If a anyone is experiencing the issue in 7.9, I encourage that they try upgrading just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead
Projects
None yet
Development

No branches or pull requests

5 participants