final long ONE_DAY_MILLIS
= 24 * 3600 * 1000L
;
long currMillis
= System
.currentTimeMillis();
long zeroMillis
= (currMillis
+ TimeZone
.getDefault().getRawOffset()) / ONE_DAY_MILLIS
* ONE_DAY_MILLIS
- TimeZone
.getDefault().getRawOffset();
public static long getTodayZeroMillis() {
long zeroMillis
= (System
.currentTimeMillis() + TimeZone
.getDefault().getRawOffset()) / ONE_DAY_MILLIS
* ONE_DAY_MILLIS
- TimeZone
.getDefault()
.getRawOffset();
return zeroMillis
;
}
转载请注明原文地址: https://lol.8miu.com/read-35378.html