feature/IO-3205-Paint-Scale-Integrations: Fix XML outputs Transaction Date

This commit is contained in:
Dave Richer
2025-04-30 13:56:18 -04:00
parent 4113a16760
commit e150ad7640

View File

@@ -195,10 +195,15 @@ export async function ppgOutputHandler(
}, },
Transaction: { Transaction: {
TransactionID: "", TransactionID: "",
TransactionDate: new Date() TransactionDate: (() => {
.toISOString() const now = new Date();
.replace("T", " ") const year = now.getFullYear();
.substring(0, 19), const month = ("0" + (now.getMonth() + 1)).slice(-2);
const day = ("0" + now.getDate()).slice(-2);
const hours = ("0" + now.getHours()).slice(-2);
const minutes = ("0" + now.getMinutes()).slice(-2);
return `${year}-${month}-${day}:${hours}:${minutes}`;
})(),
}, },
Product: { Product: {
Name: "ImEX Online", Name: "ImEX Online",
@@ -251,3 +256,4 @@ export async function ppgOutputHandler(
log.error(`Error generating PPG output for config ${config.id}:`, error); log.error(`Error generating PPG output for config ${config.id}:`, error);
} }
} }