Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix wrong date function in multiple files #1568

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/panels/GcodefilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Machine/ConfigFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Timelapse/TimelapseFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading