fix:修复因时区导致生日展示错误问题
This commit is contained in:
@@ -111,6 +111,12 @@ public class TimeUtil {
|
||||
return formatter.format(date);
|
||||
}
|
||||
|
||||
public static String getChinaDateTimeString(long milliseconds, String format) {
|
||||
Date date = new Date(milliseconds);
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.ENGLISH);
|
||||
formatter.setTimeZone(TimeZone.getTimeZone("GMT+8"));
|
||||
return formatter.format(date);
|
||||
}
|
||||
|
||||
public static String getFavoriteCollectTime(long milliseconds) {
|
||||
String showDataString = "";
|
||||
|
Reference in New Issue
Block a user