Merge remote-tracking branch 'origin/master'

pull/6/head
3y 2 years ago
commit 49af8d3830

@ -11,10 +11,10 @@ import com.java3y.austin.handler.shield.ShieldService;
import com.java3y.austin.support.utils.LogUtils;
import com.java3y.austin.support.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.HashSet;
@ -60,7 +60,7 @@ public class ShieldServiceImpl implements ShieldService {
* @return
*/
private boolean isNight() {
return Integer.valueOf(DateFormatUtils.format(new Date(), "HH")) < 8;
return LocalDateTime.now().getHour() < 8;
}

Loading…
Cancel
Save