Merge remote-tracking branch 'origin/master'

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

Loading…
Cancel
Save