mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 17:04:36 +08:00
FIX: some options on the topic timer modal weren't timezone aware (#15749)
These options weren't timezone aware: - Two Weeks - Six Months
This commit is contained in:
parent
cd2e7d5436
commit
810391f474
|
@ -82,19 +82,20 @@ export default Component.extend({
|
||||||
|
|
||||||
@discourseComputed()
|
@discourseComputed()
|
||||||
customTimeShortcutOptions() {
|
customTimeShortcutOptions() {
|
||||||
|
const timezone = this.currentUser.resolvedTimezone(this.currentUser);
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
icon: "far-clock",
|
icon: "far-clock",
|
||||||
id: "two_weeks",
|
id: "two_weeks",
|
||||||
label: "time_shortcut.two_weeks",
|
label: "time_shortcut.two_weeks",
|
||||||
time: startOfDay(now().add(2, "weeks").day(MOMENT_MONDAY)),
|
time: startOfDay(now(timezone).add(2, "weeks").day(MOMENT_MONDAY)),
|
||||||
timeFormatKey: "dates.long_no_year",
|
timeFormatKey: "dates.long_no_year",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "far-calendar-plus",
|
icon: "far-calendar-plus",
|
||||||
id: "six_months",
|
id: "six_months",
|
||||||
label: "time_shortcut.six_months",
|
label: "time_shortcut.six_months",
|
||||||
time: startOfDay(now().add(6, "months").startOf("month")),
|
time: startOfDay(now(timezone).add(6, "months").startOf("month")),
|
||||||
timeFormatKey: "dates.long_no_year",
|
timeFormatKey: "dates.long_no_year",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user