title: convert Json Date with Offset to java date
body: <p>I have a Json date with offset. I need to convert that to java. </p>
  
  <p><em>Edm.DateTime</em></p>
  
  <pre><code>"/Date(&lt;ticks&gt;["+" | "-" &lt;offset&gt;)/"
  
  &lt;ticks&gt; = number of milliseconds since midnight Jan 1, 1970
  
  &lt;offset&gt; = number of minutes to add or subtract
  </code></pre>
  
  <p>Using this <a href="https://stackoverflow.com/a/18121297/5783478">answer</a> copied below, I am able to convert this date to Java. However, this does not takes into consideration the offset component. Is there any simpler way of resolving the offset.</p>
  
  <pre><code>Date date = new Date(Long.parseLong(jsonDate.replaceAll(".*?(\\d+).*", "$1")));
  </code></pre>
  
  <p>Below are some String dates that I am getting in the json date format</p>
  
  <p>/Date(1463667774000+0400)/</p>
  
  <p>/Date(1463667774000-5300)/</p>
  
  <p>Program and result below</p>
  
  <pre><code>   str = "/Date(1463667774000-9000)/";
       date = new Date(Long.parseLong(str.replaceAll(".*?(\\d+).*", "$1")));
       System.out.println("1st "+ date);
  
        1st Thu May 19 19:52:54 IST 2016
  </code></pre>
  
  <p>Can somebody please help?</p>