title: javascript doesn't convert angular ui datepicker date to UTC correctly
body: <p>I'm using angular ui datepicker in my project(asp.net web api + angularjs). All works fine but when I'm trying to save date to Db it doesn't convert it to UTC format correctly and substructs 1 day(actually a few hours but it affects for a day too). </p>
  
  <p>For example when I choose 01/11/2014 in the datepicker: </p>
  
  <pre><code>Angularjs object:
  Sat Nov 01 2014 00:00:00 GMT+0200 (FLE Standard Time)
  
  In request: 
  2014-10-31T22:00:00.000Z
  
  In asp.net api controller:
  {31-Oct-14 10:00:00 PM}
  </code></pre>
  
  <p>Datepicker controller:</p>
  
  <pre><code>app.controller('DatepickerCtrl', function ($scope) {
      $scope.today = function () {
          $scope.dt = new Date();
      };
      $scope.today();
      $scope.clear = function () {
          $scope.dt = null;
      };
      $scope.open = function ($event) {
          $event.preventDefault();
          $event.stopPropagation();
  
          $scope.opened = true;
      };
      $scope.format = 'dd/MM/yyyy';
      $scope.dateOptions = {
          'starting-day': 1
      };
  });
  </code></pre>
  
  <p>hnml:</p>
  
  <pre><code>&lt;div class="form-group inputGroupContainer" ng-controller="DatepickerCtrl"&gt;
                      &lt;label for="date"&gt;Date of Birth&lt;/label&gt;
                      &lt;p class="input-group"&gt;
                          &lt;input type="text" name="date1" ui-date="{dateFormat: 'yy-mm-dd'}" ui-date-format="yy-mm-dd" placeholder="DD/MM/YYYY" class="form-control" datepicker-popup="{{format}}" ng-model="user.Personal.BirthDate" max-date="currentDate" is-open="opened" close-text="Close" /&gt;
                          &lt;span class="input-group-btn"&gt;
                              &lt;button type="button"   class="btn btn-default" ng-click="open($event)"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/button&gt;
                          &lt;/span&gt;
                      &lt;/p&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>But seems like angular datepicker highlight the correct date:</p>
  
  <p><img src="https://i.stack.imgur.com/dwWeV.jpg" alt="enter image description here"></p>
  
  <p>I've tried  to manually convert date to UTC format but unsuccessfully as well</p>
  
  <pre><code>   toUTCDate: function (d) {
              var date = new Date(d);
              var _utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());//, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()
              return _utc;
          }
  </code></pre>
  
  <p>Should I specify timezone or use angular js filter?</p>