+1,I need it
Iām going to add another explicit +1 in addition to hearting the FR. Even if I wanted to change my OS date format for this one app (without even thinking what else that might affect, like scripts), this in practice is broken on Linux. I have spent more time than Iād like trying to see where Obsidian is getting the date settings from on Ubuntu 20.04 with i3.
+1 - A workaround is to set ādateā as text. not ideal but
Another voice asking for the setting for display of date formats to be in Obsidian and independent of the system settings. Like many others I use multiple setting depending on the task but for my Obsidian vault I want dates to display in a certain way that is different from my normal system use.
Same problem here, does not work on macOS eitherā¦
(current stable version = macOS 13.5.1)
IMO it makes little sense to unchangably link the format to an OS setting because quite a lot of users use the date in all kinds of scripts, plugins and templates and itās confusing to have multiple formats.
It should simply default to the system settings but be configurable.
Imagine using a spreadsheet or an accounting software where youād have to change your OS locale settings to use a different currency or a navigation software to switch between imperial or metric etc.
I think the solution is probably more complicated than that, because users can have multiple devices with different locale settingsā¦
Or, multiple users sharing the same vault, can have different OS / App locale settings.
Iām sure someone who understands the whole underlying system will eventually clarify / solve it
Windows straight up does not have an option to display dates as Iād like to (yyyy.mm.dd, and no, yyyy-mm-dd is not acceptable), and doesnāt allow customization beyond a dropdown menu. And even if it did⦠itās not the format Iād want to use in some other programs.
Iām using multiple computers with different regional settings, and with the properties view this is really confusing. Even with non-slash regions slashes are used, but the order of DD/MM are reversed. I want to see the date as Iāve set up in my templates, not some random format. I can of course set the field to text as a workaround.
Iād appreciate getting the customizability back.
According to How to get the Date format in electron - javascript - Stack Overflow Electron uses the system locale to set the date/time format - which is correct for anyone who doesnāt have a different LANG and LC_TIME set. I use en_US for language and en_DK for date/time on Linux, and Obsidian is displaying en_US date format.
The implication of the Stack Overflow discussion is that Electron wonāt (and canāt) display the preferred date/time format if itās not the same as the locale setting, without some work. Though one could hack the locale setting on Linux to āsolveā that.
Looking forward to being able to manually set the display in the app itself, I do so on other apps (Thunderbird for example), so that;s a good solution to my mind.
+1, I work on multiple devices and I canāt change all of the OS settings to adapt, my cellphone dosenāt even give me that option
This seems to be a popular topic, pease refrain from +1s.
The thread will get unruly and people will get unnecessary notifications.
A possible workaround on Linux is to change the current locales in the obsidian.desktop
file.
-
Locate the .desktop file
(normally in/usr/share/applications/
) -
Change the Exec line with the locale you want (here an example):
Exec=env LANG=fr_FR.utf8 LC_ALL=fr_CH.utf8 LANGUAGE=fr_FR /opt/Obsidian/obsidian %U
You can see your current locales by writing locale
in a terminal and locale -a
to see all locales available.
This is (generally) broken on Linux.
I have a similar setup to @am4c130d with LANG=en_GB.UTF-8
and LC_TIME=de_DE.UTF-8
, yet the dates are showing up as 19/09/2023
instead of German style, which should be 19.09.2023
according to my settings.
Testing @iomys solution with en_DK
for ISO dates (https://askubuntu.com/questions/1226698/how-do-i-change-my-systemwide-date-and-time-format-to-iso-8601-yyyy-mm-dd-hhmm) was unsuccessful, even if the date command on the terminal does return the correct format.
Hereās my obsidian.desktop in case it matters:
[Desktop Entry]
Name=Obsidian
Comment=Markdown Notetaking App
GenericName=Text Editor
Type=Application
Exec=env LANG=en_DK.utf8 LC_ALL=en_DK.utf8 LANGUAGE=en_DK /home/argen/bin/obsidian %U
Icon=obsidian
StartupWMClass=obsidian
Categories=Work
MimeType=x-scheme-handler/obsidian;application/x-obsidian;
Hereās the output of locale
:
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
And en_DK
is in my locale list in the output of locale -a
As an additional comment not covered in my previous reply: This is philosophically very different from the per-vault settings that we have for everything else, e.g. see the contrast to this other open FR: Global Settings / Same settings, themes, and plugins across multiple vaults.
There is parallel precedent of sorts. Obsidianās core Daily Note plugin accepts any date formatting supported by moments.js, as does the core plugin Templates, and the core plugin Unique Note Creator. In fact, all three of those core plugins can have different date formats.
(One might wonder why ādateā formatting is handed internally within Obsidian settings for the most part, except for the one case where date formatting is tied to the OS. Noting in the UI tells us to look in OS settings.)
Yeah, I made this mistake recently⦠didnāt corrupt worksheet data, but did mess with reporting. Have since gone back to previous OS date format.
I appear to have found a resolution for my Chromebook.
I was searching Googleās support forums and found a similar reference. The end result was that I had to run
sudo dpkg-reconfigure locales
then remove en_US and then restart the chromebook
I am now able to see dates ācorrectlyā (in the format used in Australia)
Another +1 for this, changing system settings just for one app is very weird. But regardless of that Iām on Linux so itās more of a hassle and I havenāt been able to get it working in the first place as others have mentioned.
I did want to call out one extra part that I donāt see people discussing:
When you make this change please also add an option to switch between 24hr and 12hr time modes independant of the date format.
I am in the US so the date format works fine for me but I much much prefer 24hr times and the new datetime picker has no way to change that.