Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date formatted value doesn't work #1039

Open
pwsandoval opened this issue Apr 30, 2024 · 5 comments
Open

Date formatted value doesn't work #1039

pwsandoval opened this issue Apr 30, 2024 · 5 comments

Comments

@pwsandoval
Copy link

pwsandoval commented Apr 30, 2024

  • os: Windows 11
  • lsd --version: 1.1.2
  • echo $TERM: nothing
  • echo $LS_COLORS: no configured

Actual behavior

I have installed in two pc's (same lsd version, same powershell version, same fonts, same configs, etc.), with the same date string config date: "+%d-%m-%Y %I:%M %P" in one return 13-03-2024 12:13 pm (I want) and in the other 13-03-2024 12:13 (without pm or am)

PC 1 (correct)
Screenshot_7

PC 2 (incorrect)
Screenshot_1

Expected behavior

Same date in two outputs.

@junghyuneun
Copy link

just curious, do they have same locale values like time zone, etc? isn't one's LC_TYPE=C and the other one's LC_TYPE=utf-8 or sth?

@pwsandoval
Copy link
Author

just curious, do they have same locale values like time zone, etc? isn't one's LC_TYPE=C and the other one's LC_TYPE=utf-8 or sth?

I use Windows PowerShell, I understand that it is an environment variable, but I don't have it set on either computer, should I do it?

Or can a lsd configuration level be solved?

@junghyuneun
Copy link

I think this problem might be related to how ‘lsd‘ creates the date time string using each user's locale, because from what i understand not all locales have am or pm (some might just have an empty string).

And since your two computer was set up identically I was wondering if those env variables (windows language? Location? Windows version? Etc) were different by any chance.

I'm not affiliated with this project at all but since I got curious I'll take a look. And it is highly likely that it has nothing to do with locale lol.

@junghyuneun
Copy link

Different implementations and libraries of C also might have undefined behavior regarding %P so make sure that the source and the version of your C is also same? Tho i don't think the problem would lie this deep

@pwsandoval
Copy link
Author

Different implementations and libraries of C also might have undefined behavior regarding %P so make sure that the source and the version of your C is also same? Tho i don't think the problem would lie this deep

Thanks for the interest, I check the region settings and they both have the same:

Screenshot_5

I have also noticed in my screenshots that one shows some file different color such as README and LICENSE (where the date is not shown well) when it should be white

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants