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

Add time zone setting #14256

Merged
merged 1 commit into from
Jul 8, 2019
Merged

Add time zone setting #14256

merged 1 commit into from
Jul 8, 2019

Conversation

chnn
Copy link
Contributor

@chnn chnn commented Jul 3, 2019

Closes #14235

time zones

  • Adds a dropdown to dashboards and to the Data Explorer that enables selecting a time zone
  • Selected time zone is used in all visualizations
  • Default is "Local Time" (wherever the browser is running)
  • Setting is stored in local storage; will be lost if history is cleared or if you switch browsers

To Do

  • Decide which time zones are available for selection
  • Respect time zone setting in tables
  • Remove table custom time stamp formatting

@chnn chnn marked this pull request as ready for review July 8, 2019 16:34
@chnn chnn requested a review from a team July 8, 2019 16:50
@ghost ghost requested review from ebb-tide and removed request for a team July 8, 2019 16:50
Copy link
Contributor

@ebb-tide ebb-tide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@@ -331,6 +336,18 @@ class TableGraphTable extends PureComponent<Props, State> {
return _.get(dataTypes, columnName, 'n/a')
}

private get timeFormatter() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this getter can have a different name than the function it's evaluating at line 345?

{timeZone: 'Local', displayName: 'Local Time'},
{timeZone: 'UTC', displayName: 'UTC'},

// We can expose more time zone settings in the future, if we want:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing!

@chnn chnn merged commit 8f9fcfd into master Jul 8, 2019
@chnn chnn deleted the feat-ui-timezones branch July 8, 2019 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timezone support in UI (option to differ from local browser time, UTC for example)
2 participants