diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index e38dff3804..cfcc22827c 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -2416,8 +2416,7 @@ public class Helper { } static DateFormat getTimeInstance(Context context, int style) { - if (context != null && - (style == SimpleDateFormat.SHORT || style == SimpleDateFormat.MEDIUM)) + if (context != null) return new SimpleDateFormat(getTimePattern(context, style)); else return SimpleDateFormat.getTimeInstance(style); @@ -2436,8 +2435,7 @@ public class Helper { } static DateFormat getDateTimeInstance(Context context, int dateStyle, int timeStyle) { - if (context != null && - (timeStyle == SimpleDateFormat.SHORT || timeStyle == SimpleDateFormat.MEDIUM)) { + if (context != null) { DateFormat dateFormat = getDateInstance(context, dateStyle); if (dateFormat instanceof SimpleDateFormat) { String datePattern = ((SimpleDateFormat) dateFormat).toPattern(); @@ -2455,6 +2453,8 @@ public class Helper { String skeleton = (is24Hour ? "Hm" : "hm"); if (style == SimpleDateFormat.MEDIUM) skeleton += "s"; + else if (style == SimpleDateFormat.LONG) + skeleton += "sz"; return android.text.format.DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton); }