title: Time zone issue in Java
body: <p>I am using this simple code to fetch the time zone ids of the current time zone that has been set in the system.</p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args)
      {   TimeZone timezone = TimeZone.getDefault();
          System.out.println(timezone.getID());
      }
  }
  </code></pre>
  
  <p>I use the <code>tzutil /g</code> to determine the time zone and <code>tzutil /s</code> to set the timezone.
  I have observed when time zone is set to <strong>Eastern Standard Time</strong> the above code returns id as <code>America/New_York</code> but when it is set to <strong>Eastern Standard Time_dstoff</strong> then I get id as <code>GMT-05:00</code> which is undesirable. I want the output in the form of <strong><em>continent/city</em></strong>.</p>
  
  <p>How would I get that?</p>