I want to compare the server time with the device time, and calculate the diference.
Thanks Gajotres! I was very tired yesterday.
$scope.currentDate = new Date();
Then you can calculate