https://i.sstatic.net/l4YQ1.pngAfter a successful login, I am fetching server time from the back-end (in Java) and adding 1 second at intervals.
Observable.interval(1000).map(() => {
return this.time.add(1, 'seconds');
}).subscribe(currentServerTime => {
this.currentServerTime = currentServerTime ;
this.timerService.next(this.currentServerTime );
}, error => {
this._errorService.handleError(error);
});
Every minute, another call is made to the server to fetch the current server time.
The server time displays correctly but when multiple tabs of the same webpage are opened, there is a time difference observed. Is there any way to sync all open tabs?