title: Convert GMT to Local Time.
body: <p>Hi I am getting time from Server in this format : <code>Fri Nov 03 09:12:44 GMT+05:30 2017</code></p>
  
  <p>I want to convet this in format like <code>yyyy-MMM-dd  hh:mm a</code></p>
  
  <p>What I did id here,</p>
  
  <pre><code>if (!appPreference.getServerDateTime().isEmpty()) {
  
          try {
  
              SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a");
              Date newDate = format.parse(appPreference.getServerDateTime());//2017-11-03 09:12:44
  
              format = new SimpleDateFormat("yyyy-MMM-dd  hh:mm a");
              String date = format.format(newDate);
  
              dateFromUTC(newDate);
  
              mInitView.tv_lastEditeTime.setText(String.valueOf(dateFromUTC(newDate)));
              Log.d("time", "onCreateView: " + date);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
      return view;
  }
  
  public static Date dateFromUTC(Date date) {
      return new Date(date.getTime() + Calendar.getInstance().getTimeZone().getOffset(date.getTime()));
  }
  </code></pre>
  
  <p>But I am getting same GMT time. Please guide me</p>