From 43d30b2cb9b77ad5c60c29d36d96f3f093b051b4 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Sun, 6 Oct 2024 15:03:43 +0300 Subject: [PATCH] [bug] Add stub for license trial; Fix bug 70676 --- DocService/sources/utilsDocService.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DocService/sources/utilsDocService.js b/DocService/sources/utilsDocService.js index 8bfec491..b11ce5df 100644 --- a/DocService/sources/utilsDocService.js +++ b/DocService/sources/utilsDocService.js @@ -125,6 +125,10 @@ async function notifyLicenseExpiration(ctx, endDate) { const currentDate = new Date(); if (currentDate.getTime() >= endDate.getTime() - cfgStartNotifyFrom) { + //todo remove stub for "new Date(1)" and "setMonth + 1" in license.js; bug 70676 + if (endDate.getUTCFullYear() < 2000) { + endDate = currentDate; + } const formattedExpirationTime = humanFriendlyExpirationTime(endDate); if (endDate <= currentDate) { const tenNotificationRuleLicenseExpirationError = ctx.getCfg('notification.rules.licenseExpirationError.template.body', cfgNotificationRuleLicenseExpirationError);