diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 4bd54101cd..10e0c72cc5 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -3170,8 +3170,7 @@ class BaseModelSqlv2 { data = this.convertAttachmentType(data, childTable); // update date time fields - const isXcdbBase = await this.isXcdbBase(); - data = this.convertDateFormat(data, isXcdbBase, childTable); + data = this.convertDateFormat(data, childTable); return data; } @@ -3215,7 +3214,6 @@ class BaseModelSqlv2 { private _convertDateFormat( dateTimeColumns: Record[], d: Record, - isXcdbBase: BoolType, // TODO(timezone): remove ) { try { if (d) { @@ -3233,11 +3231,7 @@ class BaseModelSqlv2 { return d; } - private convertDateFormat( - data: Record, - isXcdbBase: BoolType, - childTable?: Model, - ) { + private convertDateFormat(data: Record, childTable?: Model) { // Show the date time in UTC format in API response // e.g. 2022-01-01 04:30:00+00:00 if (data) { @@ -3246,11 +3240,9 @@ class BaseModelSqlv2 { ).filter((c) => c.uidt === UITypes.DateTime); if (dateTimeColumns.length) { if (Array.isArray(data)) { - data = data.map((d) => - this._convertDateFormat(dateTimeColumns, d, isXcdbBase), - ); + data = data.map((d) => this._convertDateFormat(dateTimeColumns, d)); } else { - this._convertDateFormat(dateTimeColumns, data, isXcdbBase); + this._convertDateFormat(dateTimeColumns, data); } } }