title: How to fix dates discrepancy between MS SQL Server 2008R2/2012 and Javascript
body: <p>We store dates in the DB as a diff between the date and '1-Jan-1970' in minutes.</p>
  
  <p>Here're the results from the same machine:</p>
  
  <pre><code>--TSQL (MS Sql Server 2008R2)
  SELECT DATEADD(minute, 22572765, '1-Jan-1970'); -- gets 1-Dec-2012 12:45:00.000
  
  //JS (Chrome) - assume minDate = 1-Jan-1970
  new Date(minDate.getTime() + (22572765 * 60 * 1000)) -- gets me 1-Jan-2013 12:45:00
  </code></pre>
  
  <p>What's the best way to solve the discrepancy?</p>