title: How to get date format with timezone in java
body: <p>I'm new to java. I'd like to get this date format with the timezone in text at the end there.</p>
  
  <pre><code>2017-11-23T23:43:45-05:00[America/New_York]
  </code></pre>
  
  <p>What I have is this for now, I'd also like to add the user's default timezone as the timezone at the end there. Here's what I currently have: </p>
  
  <pre><code>SimpleDateFormat trust = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.getDefault());
  </code></pre>
  
  <p>Which gives me (Example): </p>
  
  <pre><code>2018-08-17T22:39:39-0400
  </code></pre>