Good afternoon, help me figure out how to convert the calendar, when I convert the calendar and the current time it returns a day more, and the month and year are all correct?
Here is the code that I use to convert the date, month and year:
GregorianCalendar cse = new GregorianCalendar(); cse.setTimeInMillis(Long.parseLong(cursor.getString(cursor.getColumnIndex(KEY_PUBDATE)))); // дата новости cse.add(Calendar.DAY_OF_MONTH, 1); SimpleDateFormat fmt = new SimpleDateFormat("EEE, dd MMM yyyy kk:mm:ss Z", Locale.ENGLISH); String dateString = fmt.format(cse.getTime()); Log.d("DMC6", "dateString " + dateString ); holder.textPubData.setText(dateString);
cse.add(Calendar.DAY_OF_MONTH, 1);
what do you expect? - Vartlok 2:21 pm