zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

Bug: Different date format is misleading #2091

Closed TriplEight closed 5 months ago

TriplEight commented 3 years ago

Linux app v 0.47.5

Almost everywhere, including day template, I have i.e. #dateNote=yyyy-mm-dd But in a Book Template and other calendar forms there's a weird mm/dd/yyyy

zadam commented 3 years ago

Hi, can you clarify what you mean by "book template and other calendar forms"? Ideally screenshots ...

Thanks.

zadam commented 3 years ago

Hi, can you explain what you mean by "book template and other calendar forms"? Ideally screenshots ...

Thanks.

Mirwaisse commented 3 years ago

I think he's talking about the book reviews in the demo Document: image The date format is tied to the user's OS date format: image

If I change the date format of Windows, it also changes the date format of the (promoted) attributes of the book review. (but the actual attributes still has the YYYY-MM-DD format) image

zadam commented 3 years ago

I see, yes. These widgets are coming from chrome and they respect the OS locale. But trilium has a fixed format independent from current locale ...

TriplEight commented 3 years ago

Is there a way to stabilize it (and maybe create a setting that takes some default) throughout Trilium? :pray:

zadam commented 3 years ago

I guess you could force a particular locale for the process, but I haven't researched it (LC_* env. variables in linux etc.)

good-praxis commented 2 years ago

For me the days and month are flipped specifically, what's the reason of using the system locale, but enforcing a specific placeholder for trilium? Or did I misunderstand something?

zadam commented 2 years ago

For me the days and month are flipped specifically, what's the reason of using the system locale

This is not something I can influence. These are native widgets and they use whatever system uses.

viq commented 2 years ago

Seems relevant to this ticket, I was testing things, and while setting LC_ALL=en_DK.utf8 makes trilium display date fields as dd/mm/yyyy, setting LC_TIME=en_DK.utf8 (which is recommended; setting LC_ALL is discouraged, e.g. here) seems to be ignored and date fields are still mm/dd/yyyy.

For reference, running date with LC_TIME set does alter the output.

meichthys commented 5 months ago

Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: https://github.com/TriliumNext/Notes/issues/104