title: Set default time in timepicker based on devicetime
body: <p>I have a timepicker that is in 24 hours format. Now I want to display the current device time in 24 hours format regardless of the device time format. Right now my device is in 12 hours format so for example my time is 2:04 pm the timepicker should be 14:04.</p>
  
  <p>Here's my code or the timepicker. It is on a different layout because I'm displaying them on a dialog.</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;LinearLayout android:id="@+id/datetimepickerLayout" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;DatePicker android:id="@+id/datePicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"&gt;&lt;/DatePicker&gt;
  &lt;TimePicker android:id="@+id/timePicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"&gt;&lt;/TimePicker&gt;
  
  &lt;Button
  android:id="@+id/setdatetimeBtn1"
  android:text="Set"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_marginTop="10dp"
  android:layout_gravity="center"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now in my java code:</p>
  
  <pre><code>timePicker1 = (TimePicker)dialog.findViewById(R.id.timePicker1);
  datePicker1 = (DatePicker)dialog.findViewById(R.id.datePicker1);
  setDateTimeBtn1 = (Button)dialog.findViewById(R.id.setdatetimeBtn1);
  datePicker1.setCalendarViewShown(false);
  timePicker1.setIs24HourView(true);
  </code></pre>
  
  <p>Any ideas? Thanks!</p>