diff --git a/index.js b/index.js index a155dc2..3577e30 100644 --- a/index.js +++ b/index.js @@ -12,13 +12,17 @@ function snapshotPath(){ return "/snapshot/snapshot-" + date.getFullYear() - + date.getMonth() - + date.getDay() - + "-" - + date.getHours() - + date.getMinutes() - + date.getSeconds() - + "-" + + "-" + + String(date.getMonth() + 1).padStart(2, '0') + + "-" + + String(date.getDate()).padStart(2, '0') + + "_" + + String(date.getHours()).padStart(2, '0') + + "-" + + String(date.getMinutes()).padStart(2, '0') + + "-" + + String(date.getSeconds()).padStart(2, '0') + + "_" + date.getMilliseconds() +".jpg"; }