title: Date Parsing from mysql in Android
body: <p>I set a column data type to <strong>CURRENT_TIMESTAMP</strong> in my table . It successfully saved current time.</p>
  
  <pre><code>2016-06-28 11:00:44 // it's actual mysql data
  </code></pre>
  
  <p>But when i parse it from Using GSON android i got the date string like </p>
  
  <pre><code>2016-06-28T06:09:54.000Z // parsed from json
  </code></pre>
  
  <p>That means space is alter with T &amp; Z . how i remove these two field ?</p>
  
  <p>My parsing Data is Like</p>
  
  <pre><code>Gson gson = new Gson();
                      String json = gson.toJson(args);
  
                      JSONArray test = new JSONArray(json);
                      Log.i("user registration", json);
  
                      //JSONArray jsonArray = new JSONArray(args);
                      //String aa = jsonArray.getString(0).toString();
                      //String aa = jsonArray.getString(0).toString();
                      // Log.i("user registration", aa);
                      String aa = test.getString(0).toString();
                      JSONObject jsonObject = test.getJSONObject(0);
                      JSONArray valueArrays = jsonObject.getJSONArray("values");
  
  //   // // //                         Log.e("email",newArr.getJSONObject(0).getString("email"));
                      for (int i = 0; i &lt; valueArrays.length(); i++) {
  
                          JSONObject jo = valueArrays.getJSONObject(i);
  
                          String nvp = jo.getString("nameValuePairs");
  
                          jo = new JSONObject(nvp);
  
                          User user = new User();
                          String name = jo.getString("user_name");
                          user.setUserName(name);
                          if (name.equalsIgnoreCase(mUsername)) {
  
                              Log.i("user_matched", "I am " + mUsername);
                              continue;
  
                          }
                          user.setEmail(jo.getString("email"));
                          user.setSocket_id(jo.getString("socket_id"));
                          user.setLastSeen(jo.getString("last_seen"));
  
                          if (jo.getString("status") == "1") {
                              user.setStatus("online");
                          } else
                              user.setStatus("offline");
  
  
                          mUserList.add(user);
                      }
  </code></pre>