Project

General

Profile

Actions

Bug #2849

closed

uptime should use locale settings for current time

Added by Igor Pashev over 11 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2012-06-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Currently uptime printf 12-hour time no matter what locale is set:

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8" 
LC_NUMERIC="en_US.UTF-8" 
LC_TIME="en_US.UTF-8" 
LC_COLLATE="en_US.UTF-8" 
LC_MONETARY="en_US.UTF-8" 
LC_MESSAGES="en_US.UTF-8" 
LC_ALL=

# uptime 
 7:41pm  up 17:37,  2 users,  load average: 1.49, 1.36, 1.23

# locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8" 
LC_NUMERIC="ru_RU.UTF-8" 
LC_TIME="ru_RU.UTF-8" 
LC_COLLATE="ru_RU.UTF-8" 
LC_MONETARY="ru_RU.UTF-8" 
LC_MESSAGES="ru_RU.UTF-8" 
LC_ALL=

# uptime 
  7:17после полудня  up 17:13,  2 users,  load average: 1,61, 1,41, 1,25

It is very urgly for Russian.

The time format is hardcoded in illumos-gate/usr/src/cmd/w/w.c(prtat)

GNU uptime from coreutils respects locale settings

Actions #1

Updated by Gary Mills almost 10 years ago

  • Status changed from New to In Progress
  • Assignee set to Gary Mills
  • % Done changed from 0 to 80
Actions #2

Updated by Robert Mustacchi almost 10 years ago

  • Category set to cmd - userland programs
  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100
  • Tags deleted (needs-triage)

Resolved in f05406318b2ae83404f8c9fa16f837202e6b8ed8.

Actions

Also available in: Atom PDF