File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
adminforth/dataConnectors Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -194,13 +194,8 @@ class MongoConnector extends AdminForthBaseConnector implements IAdminForthDataS
194194 if ( ! value ) {
195195 return null ;
196196 }
197- if ( field . _underlineType == 'timestamp' || field . _underlineType == 'int' ) {
198- // value is iso string now, convert to unix timestamp
199- return dayjs ( value ) . unix ( ) ;
200- } else if ( field . _underlineType == 'varchar' ) {
201- // value is iso string now, convert to unix timestamp
202- return dayjs ( value ) . toISOString ( ) ;
203- }
197+ return dayjs ( value ) . toDate ( ) ;
198+
204199 } else if ( field . type == AdminForthDataTypes . BOOLEAN ) {
205200 return value === null ? null : ( value ? true : false ) ;
206201 } else if ( field . type == AdminForthDataTypes . DECIMAL ) {
You can’t perform that action at this time.
0 commit comments