title: Android calendar event duration (API)
body: <p>why duration column in calendar Evens table does not get value set via provider?</p>
  
  <pre><code>ContentValues event = new ContentValues();
  if(allDay==1) {
      long days = (dtend - dtstart + DateUtils.DAY_IN_MILLIS - 1) / DateUtils.DAY_IN_MILLIS;
      event.put("duration", "P" + days + "D");
  } else {
      event.put("duration", "P" + ((dtend-dtstart)/DateUtils.SECOND_IN_MILLIS) + "S");
  }
  Uri eventsUri =Uri.parse("content://com.android.calendar/events")
  cr.insert(eventsUri, event);
  </code></pre>