Content
View differences
Updated by Niels Lindenthal about 3 years ago
# Decision need ### Context
> A company The "Show changes" feature proposes a way to compare between now and a relative date with a fixed time (eg. "Yesterday at 12PM"). However, this time (12PM) is not the same in California (GMT-7) has its IT department all countries, and in Pakistan (GMT+5). some regions, might technically be "the day before" or even "today".
There were challenges to the current approach (described below). The instance goal is to discuss alternatives and better ways to implement this.
### Current approach
The current approach as specified is the following:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52956/content">
* When "yesterday", "last working day", "last week" or "last month" is selected, a "Time" form field (HTML input type time) appears.
* The time is set up for California. A user entered in Pakistan wants the default time zone of the instance, which is indicated to configure a baseline for yesterday 8:00 each. Due to the right of the field.
* This default time difference, yesterday zone is 8:00 defined in Pakistan but a new setting in Administrastor → System settings → General.
* An icon to the right of the time zone indication explains that it corresponds to the default time zone, with a "+1 day" or "-1 day" if it's one day before yesterday is 20:00 or after in California. their time zone.
* A user in a different time zone has the selected time displayed in their local time below the time field, as guideline text.
# Solution idea **Challenges:**
* When creating a new baseline quere For users not in the default time zone, the time input in the actual field will not correspond to their own time.
* Filters use GMT right now. With this approach, should we take switch to this default time zone instead?
### Alternative 1: Input in local, indicate in default
Alternative 1 inverses local vs. default, as suggeted by <mention class="mention" data-id="72512" data-type="user" data-text="@Marc Alcobé">@Marc Alcobé</mention>:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52958/content">
* The time is input and displayed in local time, with the local time zone, which is indicated.
* Hovering on the help icon reminds that this is the local time zone of the user.
* The guideline text below the input reminds the user who creates what this corresponds to in the query
defaut time zone: "In default time zone: 12 PM CEST -1 day."
**Challenges:**
* Visitors from other The local time zones see might not actually correspond to "yesterday" (as it could very well be the day before or day after), and it's less clear that the "+/- day" in the guideline text under the label applies to the previous field and not this one.
* Would the filters then also use the local time zone which has been added. to search?
### Alternative 2: Repeats Every at T
This approach, inspired by the way Mailbox.org handles repeating events, was evoked by <mention class="mention" data-id="87" data-type="user" data-text="@Jens Ulferts">@Jens Ulferts</mention>:
> From my perspective, as soon as you can say "a specific timestamp and update that every x" the problem is solved. Since the specific timestamp can have a timezone it no longer matters what to display (UTC, CET, ...) at least from a technical standpoint. This is different when you have a date which by definition does not calculated to their own have timezone information making it relative. From a UI standpoint we can then do it in the local time zone because "yesterday" might it would mean the same thing for everyone.
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52959/content">
**Open questions**:
* This works quite well for a weekly repetition, but how should this approach translate for the other options?
* yesterday
* "every previous day"? This sounds odd.
* last working day
* last week
* "Every Tuesday, at 10 AM CET"? Works quite well for this case.
* last month
* "every first day of the month"? This would be different things. from what we have today, which is "the same date but last month".
*
*
> A company
There were challenges to the current approach (described below).
### Current approach
The current approach as specified is the following:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52956/content">
* When "yesterday", "last working day", "last week" or "last month" is selected, a "Time" form field (HTML input type time) appears.
* The
* This default
* An icon to
* A user in a different time zone has the selected time displayed in their local time below the time field, as guideline text.
# Solution idea
* When creating a new baseline quere
* Filters use GMT right now. With this approach, should
### Alternative 1: Input in local, indicate in default
Alternative 1 inverses local vs. default, as suggeted by <mention class="mention" data-id="72512" data-type="user" data-text="@Marc Alcobé">@Marc Alcobé</mention>:
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52958/content">
* The time is input and displayed in local time, with
* Hovering on the help icon reminds that this is the local time
* The guideline text below the input reminds the
**Challenges:**
* Would the filters then also use the local
### Alternative 2: Repeats Every at T
> From my perspective, as soon as you can say "a specific timestamp and update that every x" the problem
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/52959/content">
**Open questions**:
* This works quite well for a weekly repetition, but how should this approach translate for the other options?
* yesterday
* "every previous day"? This sounds odd.
* last working day
* last week
* "Every Tuesday, at 10 AM CET"? Works quite well for this case.
* last month
* "every first day of the month"? This would be
*
*