title: Java - date, format, time zones and Spring Boot defaults
body: <p>I have simple Java object with a date field:</p>
  
  <pre><code>@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
  private Date date;
  </code></pre>
  
  <p>When I investigate the date with debugger I see:</p>
  
  <pre><code>Wed Jun 14 00:00:00 BST 2017
  </code></pre>
  
  <p>But once I return it with <code>Spring boot</code> <code>controller</code> I get:</p>
  
  <pre><code>"date": "2017-06-13 23:00:00"
  </code></pre>
  
  <ol>
  <li>What's causing the difference?</li>
  <li>Why Java treats the date as <code>BST</code>?</li>
  <li>Does Java <code>Date</code> class contain time-zone information or just plain timestamp in long format?</li>
  <li>Is <code>Spring boot</code> using <code>UTC</code> format by default while serialising DTOs to JSON?</li>
  </ol>