1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Implemented more reliable way to sync device and server clocks that would work with filesystem sync too

This commit is contained in:
Laurent Cozic
2020-09-09 11:39:13 +01:00
parent f41ba67e15
commit 582ab4ac13
2 changed files with 43 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import { Dirnames } from './utils/types';
import ntpDate from 'lib/ntpDate';
const JoplinError = require('lib/JoplinError');
const { time } = require('lib/time-utils');
@ -114,7 +113,7 @@ export default class LockHandler {
// of that type instead.
async activeLock(lockType:LockType, clientType:string = null, clientId:string = null) {
const locks = await this.locks(lockType);
const currentDate = await ntpDate();
const currentDate = await this.api_.remoteDate();
if (lockType === LockType.Exclusive) {
const activeLocks = locks