Hi I need to display the timestamp but i didn't get the proper output here is my coding can you check my code and correct my mistakes.My code displays only UTC time not device time.
// show dateTime
viewHolder.dateTime.setVisibility(View.VISIBLE);
DateTime createdAt = message.getCreatedAt();
LBLog.v(TAG, "createdAt = " + createdAt.toString());
LBLog.v(TAG, "createdAtMillis = " + createdAt.getMillis());
DateTimeFormatter fmtTimeBubble = DateTimeFormat.forPattern(LBUtil.TIME_AM_PM_FORMAT);
viewHolder.dateTime.setText(fmtTimeBubble.print(createdAt));
}
// update divider here
DateTimeFormatter fmt = DateTimeFormat.forPattern(LBUtil.MONTH_DD_YEAR_FORMAT);
DateTime dividerDateTime = message.getCreatedAt();
viewHolder.dividerTextView.setText(fmt.print(dividerDateTime));
Please check this I need a timestamp like this: image link