title: SimpleDateFormat .format() gives different results in Java8 vs. Java11
body: <p>I'm having this little piece of code:</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.text.SimpleDateFormat;
  import java.util.Date;
  
  public class Main {
  
      public static void main(String[] args) {
  
          SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
  
          System.out.println(format.format(new Date()));
  
      }
  }
  
  </code></pre>
  
  <p>With Java 8, the output is:</p>
  
  <p><code>Tue, 16 Jul 2019 13:16:54 AEST</code></p>
  
  <p>With Java 11:</p>
  
  <p><code>Tue., 16 Jul. 2019 13:16:54 AEST</code></p>
  
  <p>Why is there a difference and how should I modify my code to make it work evenly in both Java versions?</p>
  
  <p>I was actually using <a href="https://github.com/jknack/handlebars.java" rel="noreferrer">Handlebars</a> while finding this issue, and I could narrow it down to the Java version - but it would be cool to know how to use Handlebars to produce the same result for the same format string...)</p>