mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +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:
@@ -36,6 +36,9 @@ module.exports = function(user, options) {
|
||||
}
|
||||
user.auth.timestamps.loggedin = new Date();
|
||||
user.lastCron = now;
|
||||
if (_.isFinite(+user.preferences.timezoneOffset)) {
|
||||
user.preferences.timezoneOffsetAtLastCron = user.preferences.timezoneOffset;
|
||||
}
|
||||
if (user.items.lastDrop.count > 0) {
|
||||
user.items.lastDrop.count = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user