lsd-rs / lsd-rs/lsd

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

Open
#934 4 comments 0 reactions 1 assignee Claimed by @zwpaper View on GitHub
Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

### Version

- [X] latest

### 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?

```markdown
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?

```markdown
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?

```markdown
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.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.