fix(time): Try LC_TIME before LANG

This commit is contained in:
Joshua Megnauth 2024-09-01 13:30:20 +00:00 committed by GitHub
parent 93e3b0f8f3
commit 77e6fc5908
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,7 +114,7 @@ impl cosmic::Application for Window {
_flags: Self::Flags,
) -> (Self, cosmic::iced::Command<app::Message<Self::Message>>) {
fn get_local() -> Result<Locale, Box<dyn std::error::Error>> {
let locale = std::env::var("LANG")?;
let locale = std::env::var("LC_TIME").or_else(|_| std::env::var("LANG"))?;
let locale = locale
.split('.')
.next()