From c036d15f86f383aeeb7fc49b7c9f0d7bf0076ef3 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Mon, 26 Oct 2020 14:33:20 +0000 Subject: [server/ipxebuilder] Add a leading zero to the datetime naming scheme of the ipxe builds --- server/lib/shell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/shell.js b/server/lib/shell.js index 77c5dcc..8aa4cf2 100644 --- a/server/lib/shell.js +++ b/server/lib/shell.js @@ -57,7 +57,7 @@ module.exports = { // Copy and rename the ipxe file to the __appdir/ipxe/builds/ dir. sendToLog('Copying ipxe file(s) ...\n', 'primary') const date = new Date() - const timestamp = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + '_' + date.getHours() + '-' + date.getMinutes() + '-' + date.getSeconds() + const timestamp = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' + date.getDate()).slice(-2) + '_' + ('0' + date.getHours()).slice(-2) + '-' + ('0' + date.getMinutes()).slice(-2) + '-' + ('0' + date.getSeconds()).slice(-2) for (let buildtarget of buildParameters) { const target = buildtarget.split('/') -- cgit v1.2.3-55-g7522