mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
Tasks cron ryamodal fixes (#8871)
* Changed assumption of timezone location * Added checks for RYA and moved cron check * Fixed modal scope issue
This commit is contained in:
committed by
Sabe Jones
parent
4cd272f99c
commit
bc477455bb
@@ -30,12 +30,14 @@ export function setNextDue (task, user, dueDateOption) {
|
||||
let dateTaskIsDue = Date.now();
|
||||
if (dueDateOption) {
|
||||
// @TODO Add required ISO format
|
||||
dateTaskIsDue = moment(dueDateOption).add(user.preferences.timezoneOffset, 'minutes');
|
||||
dateTaskIsDue = moment(dueDateOption);
|
||||
|
||||
// If not time is supplied. Let's assume we want start of Custom Day Start day.
|
||||
if (dateTaskIsDue.hour() === 0 && dateTaskIsDue.minute() === 0 && dateTaskIsDue.second() === 0 && dateTaskIsDue.millisecond() === 0) {
|
||||
dateTaskIsDue.add(user.preferences.timezoneOffset, 'minutes');
|
||||
dateTaskIsDue.add(user.preferences.dayStart, 'hours');
|
||||
}
|
||||
|
||||
now = dateTaskIsDue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user