title: How to list the timezone offset, timezone ID, and long name in Joda Time / Java 8?
body: <p>Time zone ids of Joda Time can simply be displayed with the following segment of code.</p>
  
  <pre><code>Set&lt;String&gt; zoneIds = DateTimeZone.getAvailableIDs();
  
  for(String zoneId:zoneIds) {
      System.out.println(zoneId);
  }
  </code></pre>
  
  <p>But how to display the corresponding timezone offset, timezone ID, and long name so that the list could look something like the following?</p>
  
  <pre><code>(GMT-10:00) Pacific/Honolulu, Hawaii Standard Time
  (GMT-10:00) Pacific/Johnston, Hawaii Standard Time
  (GMT-10:00) Pacific/Fakaofo, Tokelau Time
  (GMT-10:00) HST, Hawaii Standard Time
  </code></pre>
  
  <p>They are needed to list in a drop-down-box for selection.</p>
  
  <hr>
  
  <p>The following snippet shows the names but the offset it displays looks wonky.</p>
  
  <pre><code>Set&lt;String&gt; zoneIds = DateTimeZone.getAvailableIDs();
  
  for (String zoneId : zoneIds) {
      int offset = DateTimeZone.forID(zoneId).getOffset(new DateTime());
      String longName = TimeZone.getTimeZone(zoneId).getDisplayName();
  
      System.out.println("(" + offset + ") " + zoneId + ", " + longName);
  }
  </code></pre>
  
  <p>Out of the long list it displays, a few of them are shown like,</p>
  
  <pre><code>(-36000000) Pacific/Honolulu, Hawaii Standard Time
  (-36000000) Pacific/Johnston, Hawaii Standard Time
  (-36000000) Pacific/Fakaofo, Tokelau Time
  (-36000000) HST, Hawaii Standard Time
  </code></pre>
  
  <p>The offset should be as shown in <a href="http://joda-time.sourceforge.net/timezones.html" rel="nofollow">this</a> list.</p>