Project

General

Profile

Bug #2849

uptime should use locale settings for current time

Added by Igor Pashev over 7 years ago. Updated almost 6 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:

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

History

#1

Updated by Gary Mills about 6 years ago

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

Updated by Robert Mustacchi almost 6 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.

Also available in: Atom PDF