Fixed SimpleDateFormat problem which causes the app to crash on start.

This commit is contained in:
Alex Ning 2019-09-09 21:31:36 +08:00
parent b18e44a00c
commit 74888def28
2 changed files with 2 additions and 2 deletions

View File

@ -235,7 +235,7 @@ class ParseComment {
Calendar submitTimeCalendar = Calendar.getInstance();
submitTimeCalendar.setTimeInMillis(submitTime);
String formattedSubmitTime = new SimpleDateFormat("MMM d, YYYY, HH:mm",
String formattedSubmitTime = new SimpleDateFormat("MMM d, yyyy, HH:mm",
locale).format(submitTimeCalendar.getTime());
if(singleCommentData.has(JSONUtils.DEPTH_KEY)) {

View File

@ -184,7 +184,7 @@ class ParsePost {
Calendar postTimeCalendar = Calendar.getInstance();
postTimeCalendar.setTimeInMillis(postTime);
String formattedPostTime = new SimpleDateFormat("MMM d, YYYY, HH:mm",
String formattedPostTime = new SimpleDateFormat("MMM d, yyyy, HH:mm",
locale).format(postTimeCalendar.getTime());
String permalink = Html.fromHtml(data.getString(JSONUtils.PERMALINK_KEY)).toString();