mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:06:26 +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()
|
||||
customTimeShortcutOptions() {
|
||||
const timezone = this.currentUser.resolvedTimezone(this.currentUser);
|
||||
return [
|
||||
{
|
||||
icon: "far-clock",
|
||||
id: "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",
|
||||
},
|
||||
{
|
||||
icon: "far-calendar-plus",
|
||||
id: "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",
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue
Block a user