title: Get current time in a given timezone : android
body: <p>I am new to Android and I am currently facing an issue to get current time given the timezone.</p>
  
  <p>I get timezone in the format "GMT-7" i.e. string.
  and I have the system time.</p>
  
  <p>Is there a clean way to get the current time in the above given timezone?
  Any help is appreciated.
  Thanks,</p>
  
  <p>edit :
  Trying to do this :</p>
  
  <pre><code>public String getTime(String timezone) {
      Calendar c = Calendar.getInstance();
      c.setTimeZone(TimeZone.getTimeZone(timezone));
      Date date = c.getTime();
      SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
      String strDate = df.format(date);
      return c.getTime().toString();
  }
  </code></pre>