I'm going crazy with this simple stuff:
$scope.targetData=new Date("09 21 2015 18:04:00");
$scope.clock = new Date();
This render : targetData="2015-09-21T16:04:00.000Z" and clock="2015-09-21T16:36:53.314Z"
but in Italy it is 18:04:00... so how can I set correct ?? Thanks..
toString()implicitly being called on theDateobject. The behavior of that is implementation dependent. On Firefox, you will see the UTC time in ISO format, but in other browsers you may see the local time in RFC2822 format, or in some other locale-centric format.getTimezoneOffset, or you'll get unpredictable results unless every one of your users is in the same timezone. It's almost always best to do everything in UTC and then only convert to local time before display.