diff --git a/design/src/main/java/com/github/kr328/clash/design/util/I18n.kt b/design/src/main/java/com/github/kr328/clash/design/util/I18n.kt index d3d7e624..11076d61 100644 --- a/design/src/main/java/com/github/kr328/clash/design/util/I18n.kt +++ b/design/src/main/java/com/github/kr328/clash/design/util/I18n.kt @@ -72,5 +72,5 @@ fun Double.toProgress(): Int { } fun Long.toDateStr(): String { val simpleDateFormat =SimpleDateFormat("yyyy-MM-dd HH:mm:ss") - return simpleDateFormat.format(Date(this*1000)) + return simpleDateFormat.format(Date(this)) } \ No newline at end of file diff --git a/service/src/main/java/com/github/kr328/clash/service/ProfileManager.kt b/service/src/main/java/com/github/kr328/clash/service/ProfileManager.kt index f0a01069..a87c7013 100644 --- a/service/src/main/java/com/github/kr328/clash/service/ProfileManager.kt +++ b/service/src/main/java/com/github/kr328/clash/service/ProfileManager.kt @@ -169,7 +169,7 @@ class ProfileManager(private val context: Context) : IProfileManager, info[0].contains("expire") -> { if (info[1].isNotEmpty()) { - expire = info[1].toLong() + expire = (info[1].toDouble()*1000).toLong() } } } diff --git a/service/src/main/java/com/github/kr328/clash/service/ProfileProcessor.kt b/service/src/main/java/com/github/kr328/clash/service/ProfileProcessor.kt index 9c395650..a78b26b8 100644 --- a/service/src/main/java/com/github/kr328/clash/service/ProfileProcessor.kt +++ b/service/src/main/java/com/github/kr328/clash/service/ProfileProcessor.kt @@ -96,7 +96,7 @@ object ProfileProcessor { info[0].contains("expire") -> { if (info[1].isNotEmpty()) { - expire = info[1].toLong() + expire = (info[1].toDouble() * 1000).toLong() } } }