lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.05k stars 425 forks source link

[Bug]: %X in date field does not match output of date +%X (12 vs 24 hour format for time) #934

Open pro-sumer opened 10 months ago

pro-sumer commented 10 months ago

Version

version

1.0.0

What OS are you seeing the problem on?

Linux

installation

Manually downloaded/installed lsd binary in /usr/local/bin

term

xterm-256color

ls-colors

n/a

What happened?

I want to use the 24 hour format for dates and have correctly set my locale.

In `config.yaml` I have configured the `date` field to be `'+%Y-%m-%d %X'`

Date in output of `lsd` is `2023-10-15 05:18:32 PM` (12 hour format; wrong).

What expected?

Output of `date +%X` is `17:18:32` (24 hour format; correct).

I want `lsd` to respect the locale and give the same output as `date` when using `%X`.

What else?

As a workaround I will use `%R:%S` instead of `%X`, but I don't want to "hard code" the 24 hour format in the config file. `lsd` should respect the locale.