From bc03f73408d11b8a13135b8e3a344df696814462 Mon Sep 17 00:00:00 2001 From: Mert Ersoy Date: Mon, 7 Mar 2022 03:06:16 +0300 Subject: [PATCH] fix: incorrect datetime for MySQL Signed-off-by: Mert Ersoy --- .../components/editableCell/dateTimePickerCell.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue index b61e32c277..1501cc7ce2 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue @@ -42,7 +42,11 @@ export default { .format('YYYY-MM-DD HH:mm') }, set(val) { - this.$emit('input', val && dayjs(val).format('YYYY-MM-DD HH:mm:ssZ')) + if(this.$parent.sqlUi.name == 'MysqlUi') { + this.$emit('input', val && dayjs(val).format('YYYY-MM-DD HH:mm:ss')) + } else { + this.$emit('input', val && dayjs(val).format('YYYY-MM-DD HH:mm:ssZ')) + } } }, parentListeners() {