Properties: let the user customize the way Dates/Times are displayed (independently from OS)

I came up with a workaround for Windows, maybe cumbersome but it does work.

This is true but the displayed format defined at OS level can differ from the OS level language setting. This is also inconsistent: I can overwrite the language in the Settings of Obsidian but I can’t set the date format independently from it. Please we know this is just a cosmetic change but having a different date format in Obsidian and the OS, is very annoying.

Is there a sign of willingness from the developers to change this?

3 Likes

I totally support this. I’m struggling with dates as well. It seems something has been changed recently. In properties the date changed (for me in German: ā€œLetzte Ƅnderungā€ for today displays 20.02.2006. Today is 6.2.2025! When I change the type to text it displays the correct date. But I use 3 different date related properties. And I want to use them to sort lists and tables. But that doesn’t work when I change the date related property from date to text. Why is this so complicated? I’d be happy if the date fields would exactly match the system preferences on my Mac - but they don’t. What can I do?

AFAIK, this can happen when the value of the date or date/time key in Source mode wasn’t written following the ISO8601 format (as it’s the only format allowed for date and date/time types of keys in Properties) and Properties can’t parse the value of the key correctly :blush: …

I could still be wrong though :innocent: … But reading your post made me think about this similar issue here: {{date}} not returning today's date in templates - #5 by Pch

If anyone’s interested, I finally managed to get the ISO date format working on Linux, although I might have broken a few things along the way. Using a GNOME Desktop over Linux Mint.

First, you have to set your ā€˜LANGUAGE=en_dk’ in the exec arguments inside the obsidian.desktop file. This works for non-English languages with a date format similiar to ISO i.e Korean or Japanese, but Obsidian seems to automatically funnel all non US English locales into using ā€˜en_gb’. Looking at the value of the ā€˜navigator.languages’ array in the developer console, which is ordered by priority, ā€˜en_gb’ always ranks first, followed by the regional English locale in use, and then just ā€˜en’. First spent ages trying to change my system locale to get Obsidian to recognise it, then went down a rabbit hole of trying to figure out where the default Electron pipeline gets locale data from on Linux and how it orders this array and finally figured hey, if ā€˜en_gb’ didn’t exist anymore then things would be a lot easier.

Essentially, I manually unpacked the Obsidian AppImage using the ā€˜ā€“appimage-extract’ argument, went into the locales folder inside, and deleted both ā€˜en_gb.pak’ and ā€˜en_us.pak’ to be safe. Then, I turned it back into an AppImage using a helper tool called ā€˜appimagetool’, and ran this new AppImage with the ā€˜en_dk’ exec argument again, and it ACTUALLY WORKED. I can’t seem to open up the developer tools window anymore and might have broken other things but IT WORKS. All dates in the property view use the ISO format correctly as per ā€˜en_dk’.

For context, my first time using Linux was yesterday and this took me way too long to figure out but it was bothering me too much and I wasn’t able to actually work properly in my vault until I fixed it. I also have absolutely no clue how javascript or electron or any of these things work and largely googled my way through most of it. If anyone with a slightly better understanding of things is willing to figure out why this worked, and why the developer tools menu won’t open any more, there might be a more elegant solution here.

2 Likes

Obsidian doesn’t follow regional settings (at least on Linux). It follows only to your language locale. If you want normal (for EU people) dates, then change your en_us to en_gb language

image

1 Like

I have same problem date property format is mm/dd/yyyy while in language/region the format is correct (dd/mm/yyyy)

There’s definitely a bug involved.

Backstory: I’m located in Austria, but i like using an English OS and apps, so i’ve had my region in Windows 10 set to ā€œEnglish (Germany)ā€. However, this resulted in a weird bug with MS Office, so i had to change it to ā€œEnglish (Australia)ā€ and my input to ā€œGerman (Germany)ā€.

Before, while i was on ā€œEnglish (Germany)ā€, Obsidian honored the OS’s setting of dd.mm.yyyy. After changing my region, it is still set this way, but Obsidian now shows me dd/mm/yyyy. No way to change it (other than workarounds mentioned in this thread – probably).

Well, having said all this, i would still love a setting inside Obsidian to customize what exactly is shown in the properties area. I would even like to go one step further and have a long format shown, like ā€œTuesday, March 11, 2025ā€ or whatever i want.

OS Windows 7 SP1 x64 + Obsidian 1.8.9 via VxKex.

OS uses YYYY-MM-DD, but Obsidian property insists on MM-DD-YYYY. Aggrrhh!

2 Likes

I also just tested changing the environment variable for the language on the launch options of obsidian in KDE, and fortunately that’s the only thing I needed to change for it to show correctly the date format.

Before:
image

After:
image

Just for the heads up I am using obsidian installed directly via the Arch Linux package manager instead of an AppImage so results may vary between installation method and/or distro so perhaps the other steps that you did may be necessary for the AppImage installation.

4 Likes

Also having the same Date & Time property display issue.
I’ve set a YAML property with the Property type ā€œDate & timeā€. I fill it out as yyyy-MM-DD HH:mm. I want it to be displayed as 2025/03/29 17:59 , but instead it displays in American style 03/29/2025 05:59 PM. When I inspect the property, it has the correct yyyy-MM-DD HH:mm.

I’m on Windows 11 and my system is set to Japanese (which follows yyyy-MM-DD format), but my Obsidian display language is set to English. I also sync with an Android phone among others and don’t want to go a hacky way for all my devices.

I very much would like to change the displayed format. I hope this added to Obsidian soon.

1 Like

same here. Using Android + Windows in combination. I don’t want to change my OS settings. In Android I get YYYY-MM-DD which is what I want, on Windows/Austria I get DD.MM.YYYY. I always want YYYY-MM-DD

Please make Date Format configurable within Obsidian.

Not just for this feature, but generally this could be something on the level of Vault or User (when sharing vaults with others).

Stored format internally should always be the technical ISO YYYY-MM-DD (obviously, xkcd: ISO 8601 )

5 Likes

You can change date format by adding to your Obsidian desktop shortcut switch Obsidian.exe --lang=ru (or some other lang).

By the way, Obsidian developers, seems, could add command app.commandLine.appendSwitch('lang', 'RU') to match Obsidian UI and properies format.

More details: Add API to set locale of current app Ā· Issue #5649 Ā· electron/electron Ā· GitHub

1 Like

Stumbled upon this issue just today and was driving me nuts..
I use the Archilinux’s repository version and I keep getting the MM/DD/YYYY, HH:mm A format even if my locales are set to:

LANG=en_US.UTF-8
LC_TIME=ja_JP.UTF-8

and even by specifying them before launch via CLI and as launch option on the .desktop, they still get rendered the same…
I’m trying to set YYYY-MM-DD HH:mm.
I think there really should be an in-app setting for this, where you either specify the locale, or even better, specify the format, just like in dailies and templates.

2 Likes

After reading a bit of comments, found the suggested solution to add lang=<country_code> as executable worked.
My solution has been to edit the global .desktop file (located at /usr/share/applications on Archlinux)

from:
Exec=/usr/bin/obsidian %U

to:
Exec=/bin/sh -c "/usr/bin/obsidian --lang=ja %U"

and also had to eliminate the one at $HOME/.local/share/applications as it was creating a duplicate under xfce4.


3 Likes

Workaround for Linux:
Start Obsidian like
env LANG=en_GB.utf8 LC_ALL=en_GB.utf8 LANGUAGE=en_GB /opt/Obsidian/obsidian
(or put that behine Exec= in its .desktop file).

1 Like

Or en_DK, according to dragondark, following the Dansk standard.
This doesn’t work for me, though, maybe because i haven’t deleted en_gb.pak and en_us.pak from the Appimage, like he proposed.

I’m on Wayland with Obsidian installed as Flatpak.

The following worked for me to get YYYY-MM-DD

# setting locale override
sudo flatpak override --env=LANG=ja_JP.UTF-8 md.obsidian.Obsidian

# verify override
flatpak override --show md.obsidian.Obsidian

# undo all overrides
flatpak override --reset md.obsidian.Obsidian
# undo only specific override
flatpak override --unset-env=LANG md.obsidian.Obsidian

1 Like

Note (couldn’t edit the previous post anymore): it has some side effects such as having Japanese date placeholders or broken Dataview dates. But so far this is only hack that makes Obsidian show proper ISO-8601 style dates.

I’m using Windows 11 with the system language set to English, but my time and region are set to German. Despite this, Obsidian still displays dates in the MM/DD/YYYY format.

It would be very helpful if Obsidian allowed users to configure the date/time format directly in the settings, instead of relying only on system defaults.

1 Like