[Bug 290328] libxo produces invalid json if locale has decimal separator set to comma

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 31 Oct 2025 19:42:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290328

--- Comment #4 from Sulev-Madis Silber <bugs-freebsd-org916@ketas.si.pri.ee> ---
(In reply to Mark Johnston from comment #3)
yes the uptime-human got fixed now in current

but time-of-day shows 12h clock

> env LANG=de_DE.ISO8859-15 uptime
21:37  up 5 days,  3:36, 1 user, load averages: 0,25 0,31 0,29

> env LANG=de_DE.ISO8859-15 uptime --libxo=json,pretty
{
  "__version": "1",
  "uptime-information": {
    "time-of-day": "9:34PM",
    "uptime": 444776,
    "days": 5,
    "hours": 3,
    "minutes": 32,
    "seconds": 56,
    "uptime-human": "5 days,  3:33",
    "users": 1,
    "load-average-1": 0.42,
    "load-average-5": 0.32,
    "load-average-15": 0.29
  }
}

i don't know what and where is locale enforced, i assume LANG=C, but it's a bug

granted, it's not a critical bug but it's not expected output either

-- 
You are receiving this mail because:
You are the assignee for the bug.