refactor(savexml): changes to the date section to look more clean
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user