version:1.6.9

fix:
add:
This commit is contained in:
2021-09-17 10:01:53 +08:00
parent 0fa06f8f2a
commit 59adc142f1
67 changed files with 3637 additions and 430 deletions

View File

@@ -29,6 +29,8 @@ public class TimeUtils {
public static final String WEEK_START_TIME_KEY = "WEEK_START_TIME";
public static final String WEEK_END_TIME_KEY = "WEEK_END_TIME";
public static long dayTime = 60 * 60 * 24 * 1000;
public static long minuteTime = 60 * 1000;
public static String getNowTime() {
long nowTime = System.currentTimeMillis();
@@ -173,7 +175,7 @@ public class TimeUtils {
* @return 时间戳格式化文本
*/
public static String getDate(long time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String finaWayDate = sdf.format(time);
Log.e(TAG, "getDate: " + finaWayDate);
return finaWayDate;
@@ -332,7 +334,9 @@ public class TimeUtils {
//开始时间大于结束时间 列 1600-0100
endDate.setTime(endDate.getTime() + dayTime);
}
if (nowDate.getTime() >= startDate.getTime() && nowDate.getTime() <= endDate.getTime()) {
Log.e(TAG, "inControlTime: " + (startDate.getTime() - minuteTime));
assert nowDate != null;
if (nowDate.getTime() <= startDate.getTime() - minuteTime || nowDate.getTime() >= endDate.getTime()) {
return true;
} else {
return false;