title: JSON milliseconds date to java date
body: <p>i'm consuming a rest api , and i have this issue</p>
  
  <pre><code>java.lang.IndexOutOfBoundsException: Invalid time zone indicator '0'
  </code></pre>
  
  <p>basically I am using Gson to convert Json to my Class</p>
  
  <pre><code>Gson gson = new Gson();
      MyResponse myResponse = gson.fromJson(responseService.getNumber(id), MyResponse.class);
  </code></pre>
  
  <p>But i have a date in my json like this</p>
  
  <pre><code> "date": 1375412400000
  </code></pre>
  
  <p>How can i transform to my model class in date? To convert and show 02/25/2018 for example?</p>
  
  <p>MyResponse.class</p>
  
  <pre><code>public class MyResponse {
  
  
      List&lt;Dados&gt; dados;
  
  
      public List&lt;Dados&gt; getDados() {
          return dados;
      }
  
      public void setDados(List&lt;Dados&gt; dados) {
          this.dados = dados;
      }
  
  
  }
  </code></pre>
  
  <p>ResponseService.class</p>
  
  <pre><code>public interface ResponseService {
  
      @GetMapping("/search/rg/{rg}")
      String getDados(@PathVariable("rg") String rg);
  
  }
  </code></pre>
  
  <p>Dados.Class</p>
  
  <pre><code>public class Dados {
  
  
  
  @JsonFormat(shape = JsonFormat.Shape.STRING,pattern="dd/MM/yyyy",locale = "pt-BR", timezone = "Brazil/East")
  @DateTimeFormat(pattern = "dd/MM/yyyy")
  @Temporal(TemporalType.DATE)
  Date data;
  
  
  
  
  String codigo;
  
  String estado;
  
  
  String  cidade;
  
  String oriundo;
  
  
  ...gets and setters
  
  
  
  
  }
  </code></pre>