title: How to get date in a specific timezone?
body: <p>greetings all
  i am using the following method to get the current time in GMT timezone</p>
  
  <pre><code>public static Timestamp getCurrentTimeGMT() {
  
          Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
          long time = c.getTimeInMillis();
          long offset = TimeZone.getDefault().getOffset(time);
          return new Timestamp(time - offset);
  
      }
  </code></pre>
  
  <p>but when i try to use the same method with minor changes to get the current time in GMT+3
  it gives me the same result of GMT ? i don't know why:</p>
  
  <pre><code>public static Timestamp getCurrentTimeGMT3() {
  
      Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT+3"));
      long time = c.getTimeInMillis();
      long offset = TimeZone.getDefault().getOffset(time);
      return new Timestamp(time - offset);
  
  }
  </code></pre>
  
  <p>any ideas why the above code doesn't work properly, and how to do such a method ?</p>