こんにちは、タイムスタンプを表示する必要がありますが、ここで適切な出力が得られませんでした。コードを確認して間違いを修正できますか?私のコードでは、デバイス時間ではなく UTC 時間のみが表示されます。
// 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));
これを確認してください。次のようなタイムスタンプが必要です: 画像リンク