This commit is contained in:
Horis
2026-01-07 23:18:16 +08:00
parent 921c55e9f1
commit b41acb7788
@@ -33,8 +33,7 @@ import java.io.FileOutputStream
import java.io.InputStream import java.io.InputStream
import java.net.MalformedURLException import java.net.MalformedURLException
import java.net.URL import java.net.URL
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
@@ -213,8 +212,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)