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

Make TZ configurable #3588

Closed
wants to merge 2 commits into from
Closed

Make TZ configurable #3588

wants to merge 2 commits into from

Conversation

aochsner
Copy link

This is an attempt at #1600

@rashidkpc
Copy link
Contributor

There are a number of challenges in implementing this:

  • It needs to work in the time picker as well
  • Needs to be a GUI around this
  • It needs to work back to 1900 at least
  • It needs to be configurable on a per-field basis, thus requires field formatters. Update: I'm fine with this being part of the field formatter pull.
  • It needs to be configurable "per user". Likely as a cookie or a localStorage thing. This is probably the biggest thing since we don't really have this concept right now, and no way for the user to manage their state settings. Update: I agree this is separate, and we can deal with it when we get there.

@ignaciovazquez
Copy link

Hi Rashid,

Since developing a more complete approach sounds like a big task, is it possible to have something like a global setting work in the meantime?

I wouldn't be a perfect solution to the TZ issue, but it would allow many people waiting for a definitive fix for #1600 deploy their systems to production.

Right now, the best we have is to ask users to change the timezone settings in their computer. :-/

@ignaciovazquez
Copy link

It feels like waiting for Field Formatters + a User Module + the actual TZ implementation will take a long time.

I'm willing -as I'm sure many people are- to start tackling the TZ issue, but we need an action plan to move forward. What would an acceptable solution be for the time-being (even if it's not multi-user and index-wide) so we can begin working on it?

@aochsner
Copy link
Author

I tend to agree with @ignaciovazquez My primary use case is to make all displayed timestamps be in a particular timezone. I'm trying to ease the migration from Kibana 2 where we had this functionality to Kibana 4 (the sooner the better).

It needs to work in the time picker as well

I think it does but maybe I missed something. Could you expand on that?

It needs to be configurable on a per-field basis, thus requires field formatters.

I'm definitely not familiar enough w/ the code to really grok this. I have noticed that this PR does break the ability to set up time-series index patterns. Could this be causing that? Just haven't had time to investigate further. I don't have a need for different fields to be displayed in different timezones.

Needs to be a GUI around this

I have this in the way of Advanced Settings for now

It needs to work back to 1900 at least

Fixed to use moment-timezone-with-data which is all the timezone data it has as opposed to 2010-2020.

It needs to be configurable "per user". Likely as a cookie or a localStorage thing. This is probably the biggest thing since we don't really have this concept right now, and no way for the user to manage their state settings.

Maybe, but to me that's also an advanced/separate requirement. Even if I had this option, I would want the ability to set a global default for each user to start with.

@rashidkpc rashidkpc self-assigned this Apr 20, 2015
@rashidkpc
Copy link
Contributor

If we just call this a default. I see a few issues here:

// memoize once config is ready, and every time the date format changes
$rootScope.$on('init:config', memoizeDateFormat);
$rootScope.$on('change:config.dateFormat', memoizeDateFormat);
$rootScope.$on('init:config', updateDefaultTimezone);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this listener needed? Can you make a single function that handles memoization and setting the initial default timezone

'dateFormat:tz': {
value: 'browser',
description: 'Which timezone should be used. (e.g. "browser", "utc", or "America/Chicago")',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

#3638 has now been merged, you can replace this with:

    'dateFormat:tz': {
      value: 'Default',
      description: 'Which timezone should be used',
      type: 'select',
      options: _.union(['Default'], moment.tz.names())
    },

@aochsner
Copy link
Author

aochsner commented May 1, 2015

Thanks for the feedback @rashidkpc I'm hoping to have some time by next week to pick this back up

@aochsner aochsner mentioned this pull request May 7, 2015
@wols
Copy link

wols commented May 8, 2015

+1

@rashidkpc
Copy link
Contributor

I'm going to close this for now, please feel free to open a new pull when you get around to updating it.

@rashidkpc rashidkpc closed this Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants