mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
allow cron to record user's current timezone offset in preferences.timezoneOffsetAtLastCron (initial stage of cron timezone fix for https://github.com/HabitRPG/habitrpg/issues/3806 )
This commit is contained in:
@@ -53,6 +53,7 @@ let beforeAfter = (options = {}) => {
|
||||
before.preferences.dayStart = after.preferences.dayStart = options.dayStart;
|
||||
}
|
||||
before.preferences.timezoneOffset = after.preferences.timezoneOffset = options.timezoneOffset || moment().zone();
|
||||
before.preferences.timezoneOffsetAtLastCron = after.preferences.timezoneOffsetAtLastCron = before.preferences.timezoneOffset;
|
||||
if (options.limitOne) {
|
||||
before[`${options.limitOne}s`] = [before[`${options.limitOne}s`][0]];
|
||||
after[`${options.limitOne}s`] = [after[`${options.limitOne}s`][0]];
|
||||
|
||||
Reference in New Issue
Block a user