version:1.6.9
fix: add:
This commit is contained in:
@@ -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 {
|
||||
//开始时间大于结束时间 列 16:00-01:00
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user