Android DatePicker pick wrong date
<p>i got some strange problem in my android app, when i pick date for ex, 15march2013 in datepicker i get 9october2007</p>

<p>here's fragment from sorces</p>

<pre><code>public static class DatePickerFragment extends DialogFragment {

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        // Use the current date as the default date in the picker
        final Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month = c.get(Calendar.MONTH);
        int day = c.get(Calendar.DAY_OF_MONTH);


        // Create a new instance of DatePickerDialog and return it
        return new DatePickerDialog(getActivity(), (OnDateSetListener)getActivity(), year, month, day);
    }

}

public void onDateSet(DatePicker view, int year, int month, int day) {
    d.setDate(day);
    d.setMonth(month);
    d.setYear(year);
    int flags = 0;
    flags |= DateUtils.FORMAT_SHOW_DATE;
    flags |= DateUtils.FORMAT_SHOW_YEAR;
    String str = DateUtils.formatDateTime(this, d.getTime(), flags);
    date.setText(str);
}
</code></pre>

<p>actually i ran out of idea what can be wrong
pls help!</p>
