title: Java/JavaScript - java.time.Instant serialization to javascript Date
body: <p>I have a web API endpoint that accepts a <code>java.time.Instant</code> instance, like so:</p>
  
  <pre><code>{ "time": "2015-07-23T10:31:33Z" }
  </code></pre>
  
  <p>When I get a response back, I get this:</p>
  
  <pre><code>{ "time": 1437647493 }
  </code></pre>
  
  <p>When I try to create a new <code>Date</code> instance in JavaScript like this:</p>
  
  <pre><code>new Date(1437647493);
  </code></pre>
  
  <p>I get this result:</p>
  
  <pre><code>Sat Jan 17 1970 15:20:47 GMT+0000 (GMT Standard Time)
  </code></pre>
  
  <p>What is the relationship between <code>"2015-07-23T10:31:33Z"</code> and <code>1437647493</code> and how do I parse the result to JavaScript's <code>Date</code>?</p>