diff --git a/modules/ticket/back/methods/ticket/componentUpdate.js b/modules/ticket/back/methods/ticket/componentUpdate.js index 3edecbd614..6947cdc3b7 100644 --- a/modules/ticket/back/methods/ticket/componentUpdate.js +++ b/modules/ticket/back/methods/ticket/componentUpdate.js @@ -150,10 +150,20 @@ module.exports = Self => { minute: '2-digit', second: '2-digit' }).format(value); - oldValue = value; } - changesMade += `\r\n~${$t(change)}: ${value}~ ➔ *${$t(change)}: ${oldValue}*`; + if (oldValue instanceof Date) { + oldValue = new Intl.DateTimeFormat('es', { + year: '2-digit', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }).format(oldValue); + } + + changesMade += `\r\n~${$t(change)}: ${oldValue}~ ➔ *${$t(change)}: ${value}*`; } const message = $t('Changed this data from the ticket', {