Merge pull request 'fix: refs #6005 time issue' (!2399) from 6005-fix-time-error into test
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2399
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Pablo Natek 2024-05-03 10:12:28 +00:00
commit f5352c03a9
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ module.exports = Self => {
const {backupPrinterNotificationDelay} = await models.ProductionConfig.findOne(); const {backupPrinterNotificationDelay} = await models.ProductionConfig.findOne();
if (backupPrinterNotificationDelay) { if (backupPrinterNotificationDelay) {
const notifications = await models.NotificationQueue.find( const notifications = await models.NotificationQueue.find(
{where: {created: {gte: Date.vnNow() - (backupPrinterNotificationDelay * 1000) + (3600 * 1000)}, {where: {created: {gte: new Date(Date.vnNow() - (backupPrinterNotificationDelay * 1000))},
notificationFk: notificationName, notificationFk: notificationName,
status: 'sent' status: 'sent'
} }