uutils / uutils/coreutils

bug(date) incorrectly converts `%Y` to the Thai Buddhist calendar when `LC_TIME=th_TH.UTF-8` is set.

Open
#12,891 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - date
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Reproducer
$ locale -k LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
era=
alt_digits=
env -u LC_ALL LC_TIME=th_TH.UTF-8 \
./target/release/date -d "2026-06-14" "+%Y %B %A"
Actual output
2569 มิถุนายน วันอาทิตย์
Expected output
2026 June Sunday
GNU comparison
env -u LC_ALL LC_TIME=th_TH.UTF-8 \
date -d "2026-06-14" "+%Y %B %A"

GNU date prints:

2026 June Sunday
Notes

The active LC_TIME data contains:

mon="January;February;March;April;May;June;July;August;September;October;November;December"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
era=
alt_digits=

However, uutils prints a Buddhist Era year (2569) and Thai month/weekday names.

This suggests that the formatter is not honoring the active locale data and is instead deriving formatting behavior directly from the locale identifier (th_TH.UTF-8).

Expected behavior is to match GNU date and use the values provided by the active LC_TIME definition.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the provided ./target/release/date reproducer with LC_TIME=th_TH.UTF-8, then compare its output with GNU date and the active LC_TIME values from locale -k LC_TIME. Done means %Y %B %A produces 2026 June Sunday instead of the Buddhist year and Thai names while preserving the locale behavior described by the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.