title: Javascript and Java Date JSON serialization
body: <p>I have an javascript object with <strong>Date</strong> property which is being converted to JSON using <code>JSON.stringify</code></p>
  
  <p>I am on GMT+4 time zone (Russia/Moscow)</p>
  
  <p>For example,
  <code>5 Jan 2012</code> converts to <code>2012-01-04T20:00:00.000Z</code></p>
  
  <p><code>5 Jan 1975</code> converts to <code>1975-01-04T20:00:00.000Z</code></p>
  
  <p>But in 1975 it was GMT+3 time zone, as daylight saving was canceled in Russia in 2011. So when it cames to server (java) it deserializes as:</p>
  
  <p><code>2012-01-04T20:00:00.000Z</code> becames <code>5 Jan 2012 00:00</code> - OK</p>
  
  <p><code>1975-01-04T20:00:00.000Z</code> becames <code>4 Jan 1975</code> 23:00 - WRONG!</p>
  
  <p><strong>What is the recommended way to convert Date object to JSON in Javascript?</strong></p>