summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannik Schönartz2020-10-26 15:33:20 +0100
committerJannik Schönartz2020-10-26 15:33:20 +0100
commitc036d15f86f383aeeb7fc49b7c9f0d7bf0076ef3 (patch)
tree6d44e167e60a60bd6539cc683bf554c56f50bece
parent[server/ipxebuilder] Fixed month in console output. Thx JavaScript for nothing! (diff)
downloadbas-c036d15f86f383aeeb7fc49b7c9f0d7bf0076ef3.tar.gz
bas-c036d15f86f383aeeb7fc49b7c9f0d7bf0076ef3.tar.xz
bas-c036d15f86f383aeeb7fc49b7c9f0d7bf0076ef3.zip
[server/ipxebuilder] Add a leading zero to the datetime naming scheme of the ipxe builds
-rw-r--r--server/lib/shell.js2
1 files changed, 1 insertions, 1 deletions
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/<date> 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('/')