Os locale are not used when listing dates
Describe the bug
My locale are set to Polish and ubuntu seems to act right. Doing is still using EN.
What I get when calling eg. ls /tmp -l is

Doing still uses EN

To Reproduce
Enable other locales on Ubuntu.
Use any doing listing command like doing show
Expected behavior
Doing should display dates using os selected locales.
I'm not sure how to fix this. Date formatting just uses the date_format config string and Ruby's strftime. If it's not respecting locale, that seems like it would be a Ruby issue. If you find any documentation that shows a way to get strftime to respect locale in your case, please let me know.
On 9 May 2022, at 4:05, krzysiek-b wrote:
Describe the bug
My locale are set to Polish and ubuntu seems to act right. Doing is still using EN.
What I get when calling eg.
ls /tmp -lisDoing still uses EN
To Reproduce
Enable other locales on Ubuntu. Use any doing listing command like
doing showExpected behavior
Doing should display dates using os selected locales.
-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/doing/issues/144 You are receiving this because you were assigned.
Message ID: @.***>
I'm not a Ruby expert but here's something which looks promising https://stackoverflow.com/questions/18593661/how-do-i-strftime-a-date-object-in-a-different-locale
Still I assume this should inherit the locale from the system and use pl_PL in my case as the default. Can we add DEBUG logs to sww which one is used?
That answer is for Python, but I can see if something similar affects Ruby's strftime output.
-Brett
On 9 May 2022, at 9:42, krzysiek-b wrote:
I'm not a Ruby expert but here's something which looks promising
https://stackoverflow.com/questions/18593661/how-do-i-strftime-a-date-object-in-a-different-locale
-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/doing/issues/144#issuecomment-1121195796 You are receiving this because you were assigned.
Message ID: @.***>
Sorry to let this sit for TWO YEARS, but upon re-reading it I realize that the issue is that the date formats are hardcoded. You can modify any of them using templates. See https://github.com/ttscoff/doing/wiki/Templates#date-formatting
No problem, I understand both so this is not a big issue. Take your time :)