refactor(savexml): changes to the date section to look more clean

This commit is contained in:
2025-10-07 06:43:17 -05:00
parent 68e577c476
commit 62e78d2a30

View File

@@ -18,11 +18,11 @@ export const saveXml = (xmlContent: string, nameString: string = "request") => {
const now = new Date();
// Format YYYYMMDDHHmm
const timestamp = `${now.getFullYear()}${String(
const timestamp = `${now.getFullYear()}-${String(
now.getMonth() + 1
).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}-${String(
now.getHours()
).padStart(2, "0")}-${String(now.getMinutes()).padStart(2, "0")}`;
).padStart(2, "0")}${String(now.getMinutes()).padStart(2, "0")}`;
// Ensure xml folder path is always relative to project root
const xmlDir = path.resolve(process.cwd(), "xml");