title: Get last quarter of current time in android?
body: <p>I am tying to get last quarter of current time in android.</p>
  
  <p>for example the time is <code>12:45:00</code> and I need to have:</p>
  
  <p><code>12:30:00</code></p>
  
  <p><code>12:45:00</code></p>
  
  <p>or the time is <code>10:50:00</code> and I need to have :</p>
  
  <p><code>10:35:00</code></p>
  
  <p><code>10:50:00</code></p>
  
  <p>etc.</p>
  
  <p>I write this code and I get result true :</p>
  
  <pre><code>    DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
      Calendar cal = Calendar.getInstance();
      cal.setTime(cal.getTime());
      cal.add(Calendar.MINUTE, -15);
      String oneQuarterBack = dateFormat.format(cal.getTime());
  </code></pre>
  
  <p>But If I had <code>12:45:38</code> how I can calculate seconds ?</p>