[修复] 修正 WebDav 备份时间解析,恢复启动自动检查新备份弹窗

This commit is contained in:
Piktowo
2026-02-25 14:25:35 +08:00
parent 2cfbd91ad9
commit dfb8e9d12a
@@ -34,8 +34,7 @@ import java.io.InputStream
import java.net.MalformedURLException import java.net.MalformedURLException
import java.net.URL import java.net.URL
import java.net.URLEncoder import java.net.URLEncoder
import java.time.LocalDateTime import java.time.ZonedDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import kotlin.coroutines.coroutineContext import kotlin.coroutines.coroutineContext
@@ -219,8 +218,8 @@ open class WebDav(
val lastModify: Long = kotlin.runCatching { val lastModify: Long = kotlin.runCatching {
element.findNS("getlastmodified", ns) element.findNS("getlastmodified", ns)
.firstOrNull()?.text()?.let { .firstOrNull()?.text()?.let {
LocalDateTime.parse(it, dateTimeFormatter) ZonedDateTime.parse(it, dateTimeFormatter)
.toInstant(ZoneOffset.of("+8")).toEpochMilli() .toInstant().toEpochMilli()
} }
}.getOrNull() ?: 0 }.getOrNull() ?: 0
var fullURL = NetworkUtils.getAbsoluteURL(baseUrl, hrefDecode) var fullURL = NetworkUtils.getAbsoluteURL(baseUrl, hrefDecode)