Browse Source

12小时前的0去掉

liuzhenxing1118 2 years ago
parent
commit
cc93fe3dda
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/main/java/com/xplora/xpchat/utils/ToolsUtils.java

+ 1 - 1
app/src/main/java/com/xplora/xpchat/utils/ToolsUtils.java

@@ -148,7 +148,7 @@ public class ToolsUtils {
 
         //今天
         if (lastYear == nowYear && lastMonth == nowMonth && lastDay == nowDay) {
-            String format = timeFormat == 0 ? "hh:mm aa" : "HH:mm";
+            String format = timeFormat == 0 ? "h:mm aa" : "HH:mm";
             SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
             return sdf.format(new Date(chatTime * 1000L));
         } else if (lastYear != nowYear) {