feature/IO-3205-Paint-Scale-Integrations: Fix XML outputs Transaction Date
This commit is contained in:
@@ -195,10 +195,15 @@ export async function ppgOutputHandler(
|
||||
},
|
||||
Transaction: {
|
||||
TransactionID: "",
|
||||
TransactionDate: new Date()
|
||||
.toISOString()
|
||||
.replace("T", " ")
|
||||
.substring(0, 19),
|
||||
TransactionDate: (() => {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
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: {
|
||||
Name: "ImEX Online",
|
||||
@@ -251,3 +256,4 @@ export async function ppgOutputHandler(
|
||||
log.error(`Error generating PPG output for config ${config.id}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user