It seems that the date formatting has changed after Android version 4.4:
For Android version 4.1, DateUtils.formatDateTime corresponds to DateUtils.formatDateRange , where the string is formatted using Formatter.
But from version 4.4 for Android, DateUtils.formatDateRange uses libcore.icu.DateIntervalFormatstring formatting to format it.
public static Formatter formatDateRange(Context context, Formatter formatter, long startMillis,
long endMillis, int flags, String timeZone) {
if ((flags & (FORMAT_SHOW_TIME | FORMAT_12HOUR | FORMAT_24HOUR)) == FORMAT_SHOW_TIME) {
flags |= DateFormat.is24HourFormat(context) ? FORMAT_24HOUR : FORMAT_12HOUR;
}
String range = DateIntervalFormat.formatDateRange(startMillis, endMillis, flags, timeZone);
try {
formatter.out().append(range);
} catch (IOException impossible) {
throw new AssertionError(impossible);
}
return formatter;
}
, DateFormat/SimpleDateFormat, 4.1 Android.