From 7f55e0f05bbc607fcead207f7f2665bf6c1c2a95 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Fri, 10 May 2019 16:41:31 +0200 Subject: [PATCH] Fixed picking up wrong locale for dates --- app/src/main/java/com/topjohnwu/magisk/utils/XTime.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/XTime.kt b/app/src/main/java/com/topjohnwu/magisk/utils/XTime.kt index 26128fda4..44baef8c8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/XTime.kt +++ b/app/src/main/java/com/topjohnwu/magisk/utils/XTime.kt @@ -3,7 +3,6 @@ package com.topjohnwu.magisk.utils import java.text.DateFormat import java.text.ParseException import java.text.SimpleDateFormat -import java.util.* val now get() = System.currentTimeMillis() @@ -14,7 +13,7 @@ fun String.toTime(format: DateFormat) = try { -1L } -private val locale get() = Locale.getDefault() +private val locale get() = LocaleManager.locale val timeFormatFull by lazy { SimpleDateFormat("yyyy/MM/dd_HH:mm:ss", locale) } val timeFormatStandard by lazy { SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", locale) } val timeFormatMedium by lazy { DateFormat.getDateInstance(DateFormat.MEDIUM, LocaleManager.locale) }