title: Converting server timezone to localtime momentjs
body: <p>My server is in  EDT -4 and I'm trying to convert dates in my databse into user's local timezone using momentj. I tried everything but it doesn't work.</p>
  
  <p>These are things I tried:</p>
  
  <pre><code>//1
  var servertime= array[data].time
  var localtime= moment(servertime).toDate();
  var time = moment(localTime).format('YYYY-MM-DD HH:mm:ss');
  //Actual Database time: 2015-10-20 12:42:47    Output:2015-10-20 12:42:47
  
  //2
  var servertime= array[data].time
  var localtime= moment.utc(servertime).toDate();
  var time = moment(localTime).format('YYYY-MM-DD HH:mm:ss');
  //Actual Database time: 2015-10-20 12:42:47    Output:2015-10-20 12:42:47
  </code></pre>
  
  <p>It seems moment doesn't change it at all. </p>
  
  <p>For example when UTC time on server is : October 20, 2015 17:29
  my computer clock UTC +1 is october 20, 2015 7:30    </p>