I need to show a timer central to PHP SERVER DATE, here which is date1. (Its about a meeting which was set in Belgium time and others from different country joins the meeting to see duration of the meeting realtime.)
date1 variable value coming from PHP server located in Belgium. But the users are in USA, Middel east, Asia, Australia, and there Browser date is not same as PHP server date.
How can i get the date2 value without crawling to server as Belgium date/time? so that i can show the gape realtime on date2.
var date1 = new Date("10-01-2016 09:00:00"); // Meeting at PHP SERVER date
var date2 = new Date("10-01-2016 09:30:32"); // User joined remotely but Browser date is wrong here
var diff = date2.getTime() - date1.getTime();
var msec = diff;
var hh = Math.floor(msec / 1000 / 60 / 60);
msec -= hh * 1000 * 60 * 60;
var mm = Math.floor(msec / 1000 / 60);
msec -= mm * 1000 * 60;
var ss = Math.floor(msec / 1000);
msec -= ss * 1000;
alert(hh + ":" + mm + ":" + ss);