fix: updateInTime refs #6276
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-01-04 10:09:41 +01:00
parent 7d0c11e937
commit e354de4ff5
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ module.exports = Self => {
const machineWorker = await models.MachineWorker.findOne({ const machineWorker = await models.MachineWorker.findOne({
where: { where: {
workerFk: userId, workerFk: userId,
inTime: {gte: new Date(Date.now() - maxHours * 60 * 60 * 1000)}, inTime: {gte: Date.vnNew() - (maxHours * 60 * 60 * 1000)},
outTimed: null, outTimed: null,
machineFk: machine.id, machineFk: machine.id,
} }
@ -50,7 +50,7 @@ module.exports = Self => {
}); });
if (machineWorker) { if (machineWorker) {
await machineWorker.updateAttributes({ await machineWorker.updateAttributes({
outTime: new Date(Date.now()) outTime: Date.now()
}, myOptions); }, myOptions);
} }