Quellcode durchsuchen

12小时前的0去掉

liuzhenxing1118 vor 2 Jahren
Ursprung
Commit
cc93fe3dda
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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) {