From 0c7280ab017de21f68d17e5231d54a45cb7cdd2d Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Sun, 1 Sep 2024 01:30:04 -0400 Subject: [PATCH] Try LC_TIME before LANG for time localization --- src/localize.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/localize.rs b/src/localize.rs index 8cc8306..6102ff3 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -41,7 +41,8 @@ pub static LANGUAGE_SORTER: Lazy = Lazy::new(|| { }); pub static LANGUAGE_CHRONO: Lazy = Lazy::new(|| { - std::env::var("LANG") + std::env::var("LC_TIME") + .or_else(|_| std::env::var("LANG")) .ok() .and_then(|locale_full| { // Split LANG because it may be set to a locale such as en_US.UTF8