Can i get my device time?


I want to compare the server time with the device time, and calculate the diference.


You can simply use JavaScript Date object, it will use your device information.


Thanks Gajotres! I was very tired yesterday. :smile:


You can create a services which return server time and you can get local time in javascript with

$scope.currentDate = new Date();

Then you can calculate


I use this -
Or can use angular module -


You are using angular , so its better to use angular directive , use -