title: How to Parse Date from GMT TimeZone to IST TimeZone and Vice Versa in android
body: <p>I am working on a project that fetches Date/Time from backend in <code>IST</code>(Indian standard Time) as shown <code>"2013-01-09T19:32:49.103+05:30"</code>. However when i parse it using following DateFormat </p>
  
  <pre><code>DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
  </code></pre>
  
  <p>followed by parsing..</p>
  
  <pre><code>Date date = sdf.parse("2013-01-09T19:32:49.103+05:30");
  
  
  System.out.println("XYZ ==============&gt;"+date);
  </code></pre>
  
  <p>its Displaying date in GMT format as output i.e</p>
  
  <pre><code>Wed Jan 09 14:02:49 GMT+00:00 2013.
  </code></pre>
  
  <p>I have tried it using TimeZone class as..</p>
  
  <pre><code>TimeZone timeZone=TimeZone.getTimeZone("IST");
  sdf.setTimeZone(timeZone);
  </code></pre>
  
  <p>but no effect..</p>
  
  <p>How could i get a <code>Date</code> class Object having Date in <code>IST</code> format instead of GMT...</p>
  
  <p>Please provide an appropriate solution..</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is how Code Looks Like:</p>
  
  <pre><code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
  
  TimeZone timeZone=TimeZone.getTimeZone("IST");
  sdf.setTimeZone(timeZone);
  
  Date date = sdf.parse("2013-01-09T19:32:49.103+05:30");
  String formattedDate=sdf.format(date);
  
  System.out.println("XYZ ==============&gt;"+formattedDate);
  </code></pre>