title: Parsing Time From json. Specific Format
body: <p>I receive the below JSON and i am able to parse through the Description and date. I have been trying to parse through the time but everything that i try keeps giving me bad output. </p>
  
  <p>The time object is supposed to say 5:30 but i do not know if i am able to parse through that format. I thought it was <code>public String format3339 (boolean allDay)</code>
  I have posted the JSON Input, my JSON parsing, and the output. </p>
  
  <p>Input</p>
  
  <pre><code>{"object":[{"description":"blah blah blah","date":"2012-12-11","time":"2000-01-01T05:30:00Z"}]}
  </code></pre>
  
  <p>Mainly i am worried about <code>"time":"2000-01-01T05:30:00Z"</code></p>
  
  <p>Parsing</p>
  
  <pre><code>JSONArray arr = null;
  list = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  }
  for (int i = 0; i &lt; arr.length(); i++) {
      JSONObject d = arr.getJSONObject(i);
      Time time = new Time();
      String etime = d.getString(TIME_TAG);
      String description = d.getString(DESCRIPTION_TAG);
      String date = d.getString(DATE_TAG);
              //************************************************************************
              //********I suspect that i might be converting the time object incorrectly but whatever 
              //********i put here either does not work or gives me bad output. 
      Boolean mtime = time.parse3339(etime);
      if (mtime == true) {
          etime = time.toString();
      }
              //************************************************************************
      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
      map.put(DATE_TAG, date);
      map.put(DESCRIPTION_TAG, description);
      map.put(TIME_TAG, etime);
  
      list.add(map);
  </code></pre>
  
  <p>OutPut- I do not understand this output I thought that the input was 3339 format but the output is difficult to work with. I guess i could make a parser to parse out the 530 from the string given but i thought my output would be YYYYMMDDTHHMMSS format from the toString() operation.</p>
  
  <pre><code>20000101T053000UTC(0,0,0,-1,946704600)
  </code></pre>
  
  <p>EDIT::Here is what i hacked together to get what i want with little effort. It works for now.</p>
  
  <pre><code>JSONArray arr = null;
  list = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  }
  for (int i = 0; i &lt; arr.length(); i++) {
      JSONObject d = arr.getJSONObject(i);
      String etime = d.getString(TIME_TAG);
      String description = d.getString(DESCRIPTION_TAG);
      String date = d.getString(DATE_TAG);
  
          if (eTime.charAt(11) == '0')
      eTime = eTime.substring(12, 16);
      else
      eTime = eTime.substring(11, 16);
  
              HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
      map.put(DATE_TAG, date);
      map.put(DESCRIPTION_TAG, description);
      map.put(TIME_TAG, etime);
  
      list.add(map);
  </code></pre>