Properties: Date format not following system settings on Linux (LANG vs LC_TIME)

I have found a workaround, but you would need to do it on each Linux system (annoying, this bug should be fixed).

If using KDE Plasma you can right click the obsidian application in start-menu and click “Edit Application“. In `Environment variables:` add `LANG=’your UTF-8 you want to use’` the language of the application remains the same as what you have set in Obsidian → Settings → General → Language.

Launching from terminal can be done with `LANG=’your UTF-8 you want to use’ obsidian`, which can be aliased as obsidian-fix (or something else except obsidian). With Fish that can be done with adding `alias obsidian-fix=’LANG=’your UTF-8 you want to use’ obsidian’` to your fish configuration. can be done with bash to.

That said I personally think that this should be an option under Obsidian → Settings → General → “Date Format”. This can be unset as default that should respect LC_TIME first then fallback to LANG if neither option is populated or is somehow wrong.

Reposted because of formatting issues and I could not edit my last message..

Thanks for that. Could you make an example? Sure you mean UTF-8 and not an ISO standard? And sure you mean LANG because it’s not the language of the app but only the date format?

Yes I can make an example.
Backstory: I was born and live in Norway and speak Norwegian, but I work in the tech industry and find English easier to use, so from when i was young I used English on phones, computers and everything else that had an language option. I actually prefer to read English, but my keyboard layout is Norwegian ISO or sometime named Nordic ISO.

Since Obsidian is using the LANG=”Your system language.UTF-8” environment variable instead of the standard LC_TIME environment variable (which contains both time format and date format set for each language) to determine what what date and time format is shown. You can check what you have on your system by running the following command in terminal:

export | grep UTF

Which for me gives me the following:

LANG en_US.UTF-8
LC_ADDRESS nb_NO.UTF-8
LC_IDENTIFICATION nb_NO.UTF-8
LC_MEASUREMENT nb_NO.UTF-8
LC_MONETARY nb_NO.UTF-8
LC_NAME nb_NO.UTF-8
LC_NUMERIC nb_NO.UTF-8
LC_PAPER nb_NO.UTF-8
LC_TELEPHONE nb_NO.UTF-8
LC_TIME nb_NO.UTF-8

Here you see that my LANG=en_US.UTF-8, this means my visual operating system language is set to US English in system settings seen below:


But I also use Norwegian formats for everything else.

So to force a “per-application” LANG environment to a application you can do what i did in my last post. To show in a little more detail of how i achieved this for Norwegian formats (just set to your own UTF-8 language) do the following:


Then launch Obsidian and see that Application language is still the same but the dates in notes is set correctly. As shown below:


Hope this helps.

Actually I forgot to reload Obsidian to see the change before taking a screenshot, so here’s the correct picture showing the correct date for Norwegian (dd.mm.åååå):

Thanks for the examples. I am still unsure if »UTF-8 language« is a precise term but now I see what you meant. Unfortunately, that does not work for me. I would have expected that setting `LANG` would change the language of the app and only indirectly the date format. But launching obsidian with this (either per Shortcut/.desktop config or via terminal) does not change anything. I assume that Obsidian’s own settings override this env var. My suggestion would also be to simply configure the date/time format manually in Obsidian as the language seems to be treated.

That’s what I would prefer too, but as of right now it does not have that option.

Did you close and reopen obsidian after doing the “workaround”?
What is your preferred date and time format and what is the language you tried?

Yes, I restarted Obsidian every time I changed the settings or tried to launch it via envvar. I have my system configured in en_US, Obsidian itself in English, and want to have German time/date formatting. As I said earlier, I’d find it weird if only the date/time format changed (and not Obsidian’s UI language itself) when launching only with a different LANG envvvar value.

I also just checked if the date format situation had improved (been using text properties for a while to avoid it). After seeing that there was neither a new setting nor support for LC_TIME, I tried both LANG and LC_ALL with different installed locales (de_DE and sv_SE), e.g. LANG=de_DE.utf8 /usr/bin/obsidian, and even that had no effect.
(Obsidian 1.12.7 installed from official deb package on Linux Mint.)

It worked for me by using “LANG=pt_BR.UTF-8” on the KDE menu editor. It would propably work the same by setting it on the .desktop file. I’m on NixOS, but it should be the same on all systems. I use all my Locales set to “pt_BR.UTF-8” and only the LANG on “en_US.UTF-8”, which causes the same behaviour as you had.