Skip to content

Commit

Permalink
fix: pad start of import label timestamp (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy authored Nov 24, 2024
2 parents 153821c + 15bf4b6 commit 9cabbb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/app/services/import.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ImportService {
const date = new Date();

return this.translate.instant("pages.import.defaultLabel", {
dateStamp: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`,
dateStamp: `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")} ${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}`,
});
}

Expand Down

0 comments on commit 9cabbb6

Please sign in to comment.