新增排程接口

This commit is contained in:
fengjignqi
2026-05-25 15:43:34 +08:00
parent e6e3f755d0
commit 6c6d211701
12 changed files with 388 additions and 51 deletions

View File

@@ -257,6 +257,38 @@ public class ZYTimeUtils {
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
/**
* yyyy-MM-dd HH:mm:ss 转换成 yyyy-MM-dd HH:mm
* @param time
* @return
*/
public static String timeWithoutMillis(String time) {
if (TextUtils.isEmpty(time)) {
return null;
}
try {
SimpleDateFormat sourceFormat =
new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss",
Locale.getDefault());
SimpleDateFormat targetFormat =
new SimpleDateFormat(
"yyyy-MM-dd HH:mm",
Locale.getDefault());
Date date = sourceFormat.parse(time);
return date == null ? "" : targetFormat.format(date);
} catch (Exception e) {
e.printStackTrace();
}
return "";
}