Skip to content

Commit

Permalink
修复网络时间导致任务异常重置的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
teble committed Oct 28, 2023
1 parent 9c443d4 commit 1ed4394
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/me/teble/xposed/autodaily/utils/TimeUtil.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package me.teble.xposed.autodaily.utils

import me.teble.xposed.autodaily.hook.config.Config.xaConfig
import me.teble.xposed.autodaily.hook.utils.ToastUtil
import me.teble.xposed.autodaily.task.util.millisecond
import java.net.HttpURLConnection
import java.net.URL
import java.time.LocalDateTime
import java.time.OffsetDateTime
import java.time.ZoneId
import java.time.ZonedDateTime
import java.util.*
import java.util.Date

object TimeUtil {

Expand Down Expand Up @@ -44,7 +43,7 @@ object TimeUtil {
uc.connectTimeout = 2000
uc.connect()
// 避免时间误差
uc.date + 500
if (uc.date == 0L) null else uc.date + 500
}
}

Expand Down

0 comments on commit 1ed4394

Please sign in to comment.