From d2619a6abd6335f95d6724a04acce39f7a9a2716 Mon Sep 17 00:00:00 2001 From: andrew-signal Date: Fri, 13 Mar 2026 10:53:48 -0400 Subject: [PATCH] Use app locale when formatting LocalTime, rather than system locale. --- .../java/org/thoughtcrime/securesms/util/JavaTimeExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/JavaTimeExtensions.kt b/app/src/main/java/org/thoughtcrime/securesms/util/JavaTimeExtensions.kt index a5a0cf0389..9f0080109a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/JavaTimeExtensions.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/JavaTimeExtensions.kt @@ -95,7 +95,7 @@ fun LocalTime.formatHours(context: Context): String { // We have to create our own pattern here, since the formatter instance returned by DateTimeFormatter.ofLocalizedTime() is looked up lazily, is immutable, // and is not updated when the system's 24-hour time setting changes. val pattern = if (DateFormat.is24HourFormat(context)) "HH:mm" else "h:mm a" - return DateTimeFormatter.ofPattern(pattern, Locale.getDefault()).format(this) + return DateTimeFormatter.ofPattern(pattern, LocaleUtil.getFirstLocale()).format(this) } /**