Conversation
563a2c6 to
a8da570
Compare
|
I tried to approach this issue previously. The two main problem are:
|
|
@enykeev agreed on both points. This PR was the laziest way I could accomplish the ask once I got my bearings and get a covo going. If we want the ability to modify then I have two options in my head:
I'm not opposed to using something like |
|
My understanding is that there should be a central What matters: when specific action execution happened on specific server. And that server even can have wrong time ( IMO having every CLI/WEB/ST2 their "special" way of recognizing the TZ/time can bring even more confusion. |
|
I'm actually curious now why we have a configureable timezone in |
|
I just read a bunch of old Issues related to Time Zones we had. Looks like indeed we need to make happy everyone :) Based on that here is a chain:
Meaning if That'll give an option for everyone, including orgs. which have all the IT operations in a common TZ (via st2.conf). |
|
To add more fuel to the fire it would appear that the only time I even went as far as to implement a majority of the API endpoint to get We could go one of two ways from here - IMO (Unless my deduction from above is totally off base, which is possible). We could go route 1. Where we make a big push to unify how we handle TZ - though what we'd actually do here is unclear to me. Route 2. is to just implement st2client style TZ handling in st2web where the user is given a TZ option and that is set in a cookie. |
|
Per slack convo w/ @lakshmi-kannan and @Kami we're going route 2. Implement |
Sounds good. Only thing I might consider doing differently is perhaps defaulting to UTC instead of a local user timezone. |
…o issue-292/timezone
…it to determin utc status. Adding needed packages to support transpile of spread object. Adding st2-redux component to allow for common store for many components.
… timeState object. Updating react packages to get rid of all dem errors.
…default. Updating tests/util.js to prep for test fix.
… bug with wrong date when on local time.
|
|
||
| <main class="st2-panel"> | ||
|
|
||
| <div class="st2-redux"></div> |
|
|
||
| <main class="st2-panel" data-test="history_panel"> | ||
|
|
||
| <div class="st2-redux"></div> |
| {{ record.trigger_instance.occurrence_time | date:'EEE, dd MMM y HH:mm:ss UTC':'UTC' }} | ||
| <div class="st2-time" | ||
| timestamp="record.trigger_instance.occurrence_time" | ||
| utcdisplay="utcDisplay" |
| link: function postLink(scope) { | ||
| scope.routes = scope.state.get().map(route => { | ||
| return Object.assign(route, { | ||
| return Object.assign(route, { |
|
|
||
| return ( | ||
| <Time | ||
| data-test={datatest ? datatest : undefined} |
There was a problem hiding this comment.
I'd rather you would use {...restProps}. Data- props are falling through as is in react.
| "angular-ui-router": "1.0.0-alpha.1", | ||
| "lodash": "2.4.2", | ||
| "ngreact": "0.2.0", | ||
| "ngreact": "^0.4.1", |
There was a problem hiding this comment.
Please stick to exact versions. I recommend to set it once with npm config set save-exact true.
|
@LindsayHill sadly I can't repro this. Can you provide system info/etc. And any console errors you're seeing? |
…feeding proper scope vars to component in actions page.
|
@enykeev Unfortunately using spread to get remaining props would't work in this instance since |
|
👍 |
| "ngify": "1.4.1", | ||
| "npm-shrinkwrap": "200.5.1", | ||
| "react-addons-test-utils": "0.14.8", | ||
| "react-time": "4.3.0", |
There was a problem hiding this comment.
Yep, missed that one. Both react-time and moment are supposed to be dependencies, not devDependencies. Will change it in my PR.

This PR should serve as a launch pad for a conversation on how we want to handle TZ as well as implementing what gets decided.
Fixes #292