(core) setting timezone on create column

Summary: Before this diff, "Create at" and "Modify at" had empty "Timezone" field in column editor panel. This diff is setting document timezone to DateTime column created by this shortcuts

Test Plan: Manual so far

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: georgegevoian

Differential Revision: https://phab.getgrist.com/D4086
This commit is contained in:
Jakub Serafin 2023-10-23 10:24:21 +02:00
parent e95295ffee
commit 77726849ad

View File

@ -109,7 +109,7 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
await gridView.insertColumn(t('Created At'), { await gridView.insertColumn(t('Created At'), {
colInfo: { colInfo: {
label: t('Created At'), label: t('Created At'),
type: 'DateTime', type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
isFormula: false, isFormula: false,
formula: 'NOW()', formula: 'NOW()',
recalcWhen: RecalcWhen.DEFAULT, recalcWhen: RecalcWhen.DEFAULT,
@ -127,7 +127,7 @@ function buildTimestampMenuItems(gridView: GridView, index?: number) {
await gridView.insertColumn(t('Last Updated At'), { await gridView.insertColumn(t('Last Updated At'), {
colInfo: { colInfo: {
label: t('Last Updated At'), label: t('Last Updated At'),
type: 'DateTime', type: `DateTime:${gridView.gristDoc.docModel.docInfoRow.timezone()}`,
isFormula: false, isFormula: false,
formula: 'NOW()', formula: 'NOW()',
recalcWhen: RecalcWhen.MANUAL_UPDATES, recalcWhen: RecalcWhen.MANUAL_UPDATES,