title: Compare Server Time and Browser Time
body: <p>My table that has 3 columns: <code>FileName</code>, <code>LastUpdateTime</code>, and a Restart button. </p>
  
  <p>I need to display the restart button only if the last update time is more than 20 min ago. I get the last update time from the server. <code>d = new Date()</code> gives the local browser time but the lastUpdateTime is coming from the server.  Server is in the different time zone than the clients browser.  </p>
  
  <p>The following code works if both server and browser are in the same time zone. Do you have any suggestions on how solve this if the server and browser are in a different time zone?</p>
  
  <p>This application supposed to run anywhere in US and Europe.</p>
  
  <pre><code>var lastUpdatedTime = (gridData[i].LastTimeUpdated);
  var d = new Date();
  //deducting 20 min from current time
  var deductTwenty = d.setMinutes(d.getMinutes() - 20); 
  var parsedupdatetime = Date.parse(lastUpdatedTime);                          
  
  // If the last update time is not 20 ago, hide it. 
  if (parsedupdatetime &gt; deductTwenty) {
      newrestartButton.hide();
  }
  </code></pre>