diff --git a/src/services/state.service.ts b/src/services/state.service.ts index 08589586..87bb346c 100644 --- a/src/services/state.service.ts +++ b/src/services/state.service.ts @@ -440,9 +440,10 @@ export class StateService extends BaseStateService implements StateServ } async getLastUserSync(options?: StorageOptions): Promise { - return ( + const userSyncDate = ( await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())) )?.directorySettings?.lastUserSync; + return userSyncDate ? new Date(userSyncDate) : null; } async setLastUserSync(value: Date, options?: StorageOptions): Promise { @@ -457,9 +458,10 @@ export class StateService extends BaseStateService implements StateServ } async getLastGroupSync(options?: StorageOptions): Promise { - return ( + const groupSyncDate = ( await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())) )?.directorySettings?.lastGroupSync; + return groupSyncDate ? new Date(groupSyncDate) : null; } async setLastGroupSync(value: Date, options?: StorageOptions): Promise {