fix: fix wrong date function in multiple files (#1568)

This commit is contained in:
Stefan Dej 2023-10-04 22:27:01 +02:00 committed by GitHub
parent 2670eb6447
commit 7d86df0c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1322,7 +1322,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin, ControlMixin) {
await addElementToItems('gcodes/' + this.currentPath, this.selectedFiles)
const date = new Date()
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDate()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
this.$socket.emit(
'server.files.zip',

View File

@ -1050,7 +1050,7 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
const date = new Date()
const month = (date.getMonth() + 1).toString().padStart(2, '0')
const day = date.getDay().toString().padStart(2, '0')
const day = date.getDate().toString().padStart(2, '0')
const hours = date.getHours().toString().padStart(2, '0')
const minutes = date.getMinutes().toString().padStart(2, '0')
const seconds = date.getSeconds().toString().padStart(2, '0')

View File

@ -83,7 +83,7 @@ export default class GitCommitsList extends Mixins(BaseMixin) {
if (
commitDate.getFullYear() !== lastCommitDate.getFullYear() ||
commitDate.getMonth() !== lastCommitDate.getMonth() ||
commitDate.getDay() !== lastCommitDate.getDay()
commitDate.getDate() !== lastCommitDate.getDate()
) {
output.push({
date: commitDate,

View File

@ -746,7 +746,7 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
await addElementToItems(this.currentPath, this.selectedFiles)
const date = new Date()
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDay()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
const timestamp = `${date.getFullYear()}${date.getMonth()}${date.getDate()}-${date.getHours()}${date.getMinutes()}${date.getSeconds()}`
this.$socket.emit(
'server.files.zip',