Skip to content

Commit f7385d9

Browse files
authored
Merge pull request #2583 from samuelx12/revert/datetime-utc-changes
revert: timezone conversion intended for meta fields, accidentally broke datetime columns
2 parents 8a06fec + ef95f65 commit f7385d9

7 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎src/modules/main/partials/ColumnInfoPopover.vue‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ export default {
7272
},
7373
methods: {
7474
relativeDateTime(v) {
75-
const value = moment.utc(v).local()
76-
return value.format('L') === moment().format('L') ? t('tables', 'Today') + ' ' + value.format('LT') : value.format('LLLL')
75+
return moment(v).format('L') === moment().format('L') ? t('tables', 'Today') + ' ' + moment(v).format('LT') : moment(v).format('LLLL')
7776
},
7877
},
7978
}

‎src/shared/components/ncTable/mixins/columnsTypes/datetime.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class DatetimeColumn extends AbstractDatetimeColumn {
1919
}
2020

2121
formatValue(value) {
22-
return Moment.utc(value, 'YYYY-MM-DD HH:mm:ss').local().format('lll')
22+
return Moment(value, 'YYYY-MM-DD HH:mm:ss').format('lll')
2323
}
2424

2525
sort(mode, nextSorts) {

‎src/shared/components/ncTable/mixins/columnsTypes/datetimeDate.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class DatetimeDateColumn extends AbstractDatetimeColumn {
1515
}
1616

1717
formatValue(value) {
18-
return Moment.utc(value, 'YYYY-MM-DD HH:mm:ss').local().format('ll')
18+
return Moment(value, 'YYYY-MM-DD HH:mm:ss').format('ll')
1919
}
2020

2121
sort(mode, nextSorts) {

‎src/shared/components/ncTable/mixins/columnsTypes/datetimeTime.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class DatetimeTimeColumn extends AbstractDatetimeColumn {
1515
}
1616

1717
formatValue(value) {
18-
return Moment.utc(value, 'HH:mm:ss').local().format('LT')
18+
return Moment(value, 'HH:mm:ss').format('LT')
1919
}
2020

2121
sort(mode, nextSorts) {

‎src/shared/components/ncTable/partials/TableCellDateTime.vue‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ export default {
171171
newValue = 'none'
172172
} else {
173173
const format = this.getDateFormat()
174-
const editDateTimeMoment = Moment(this.editDateTimeValue)
175-
newValue = this.column.type === 'datetime-date'
176-
? editDateTimeMoment.format(format)
177-
: editDateTimeMoment.utc().format(format)
174+
newValue = Moment(this.editDateTimeValue).format(format)
178175
}
179176
180177
if (newValue === this.value) {

‎src/shared/components/ncTable/partials/rowTypePartials/DatetimeForm.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default {
5959
} else if (!v) {
6060
this.$emit('update:value', this.isMandatoryField ? null : 'none')
6161
} else {
62-
this.$emit('update:value', Moment(v).utc().format('YYYY-MM-DD HH:mm'))
62+
this.$emit('update:value', Moment(v).format('YYYY-MM-DD HH:mm'))
6363
}
6464
},
6565
},

‎src/shared/components/ncTable/partials/rowTypePartials/DatetimeTimeForm.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
if (v === 'none') {
6464
this.$emit('update:value', v)
6565
} else if (v) {
66-
this.$emit('update:value', Moment(v).utc().format('HH:mm'))
66+
this.$emit('update:value', Moment(v).format('HH:mm'))
6767
}
6868
},
6969
},

0 commit comments

Comments
 (0)