title: Convert UTC date to Local Time in Android?
body: <p>I have a date <code>String</code> like <code>2017-09-16T05:06:18.157</code> and I want to convert it to local time (IST). In Indian Standard Time it will be around <code>2017-09-16 10:36:18</code>.</p>
  
  <p>With Joda-Time, I have tried to convert it to local but I was not able to do it. </p>
  
  <p>Below is my code:</p>
  
  <pre><code>private String getConvertDate(String date_server) {
      DateTimeFormatter inputFormatter = DateTimeFormat
              .forPattern("yyyy-MM-dd'T'HH:mm:ss.SSS")
              .withLocale(Locale.US);
  
      DateTime parsed = inputFormatter.parseDateTime(date_server);
  
      DateTimeFormatter outputFormatter = DateTimeFormat
              .forPattern("yyyy-MM-dd HH:mm:ss")
              .withLocale(Locale.US)
              .withZone(DateTimeZone.getDefault());
  
      return outputFormatter.print(parsed);
  }
  </code></pre>