Bug 617033 - LANG=en_US.UTF-8 displays same time stamp format as LANG=C
LANG=en_US.UTF-8 displays same time stamp format as LANG=C
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
13
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-21 21:49 EDT by Adam Drew
Modified: 2010-07-22 04:55 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-22 04:55:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Adam Drew 2010-07-21 21:49:59 EDT
Description of problem:

On Fedora 13 running en_US.UTF-8 and C locales display the same time stamp format:

[adam@zylog-vostro ~]$ export LANG=C
[adam@zylog-vostro ~]$ ls -l
total 40
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Desktop
drwxr-xr-x.  6 adam adam 4096 Jul 20 12:58 Documents
drwxr-xr-x.  4 adam adam 4096 Jul 21 20:32 Downloads
drwxr-xr-x. 77 adam adam 4096 Jul 19 09:35 Music
drwxr-xr-x.  6 adam adam 4096 Jul 19 10:05 Pictures
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Public
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Templates
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Videos
drwxrwxr-x   3 adam adam 4096 Jul 19 13:36 kdesvn
drwxrwxr-x   2 adam adam 4096 Jul 19 19:34 logs
[adam@zylog-vostro ~]$ export LANG=en_US.UTF-8
[adam@zylog-vostro ~]$ ls -l
total 40
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Desktop
drwxr-xr-x.  6 adam adam 4096 Jul 20 12:58 Documents
drwxr-xr-x.  4 adam adam 4096 Jul 21 20:32 Downloads
drwxrwxr-x   3 adam adam 4096 Jul 19 13:36 kdesvn
drwxrwxr-x   2 adam adam 4096 Jul 19 19:34 logs
drwxr-xr-x. 77 adam adam 4096 Jul 19 09:35 Music
drwxr-xr-x.  6 adam adam 4096 Jul 19 10:05 Pictures
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Public
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Templates
drwxr-xr-x.  2 adam adam 4096 Jul 18 20:25 Videos

On earlier versions of Fedora 12 this was different:

echo $LANG
en_US.UTF-8
[kc8hfi@charlie perl]$ ls -l
total 276
-rw-rw-r--. 1 kc8hfi kc8hfi    240 2010-05-03 19:38 client.pl
-rw-rw-r--. 1 kc8hfi kc8hfi   4245 2010-05-09 00:10 keyevent.pl
-rw-rw-r--. 1 kc8hfi kc8hfi   1405 2010-02-28 18:11 mysql_to_sqlite.pl

[kc8hfi@charlie perl]$ export LANG=C
[kc8hfi@charlie perl]$ echo $LANG
C
[kc8hfi@charlie perl]$ ls -l
total 276
-rw-rw-r--. 1 kc8hfi kc8hfi    240 May  3 19:38 client.pl
-rw-rw-r--. 1 kc8hfi kc8hfi   4245 May  9 00:10 keyevent.pl
-rw-rw-r--. 1 kc8hfi kc8hfi   1405 Feb 28 18:11 mysql_to_sqlite.pl
-rw-rw-r--. 1 kc8hfi kc8hfi   2105 May  9 10:25 server.pl



Version-Release number of selected component (if applicable):

I am not sure but maybe glibc-common-2.12-3.i686
glibc-common-2.12-3.i686 provides /usr/bin/locale so I thought maybe that

How reproducible:

100% of the time

Steps to Reproduce:
1. Set LANG to C
2. Verify MMM-DD in ls -l
3. Set LANG to en_US.UTF-8
4. Verify MMM-DD in ls -l
  
Actual results:

C and en_US.UTF-8 have the same date format.

Expected results:

C and en_US.UTF-8 have different date formats.

Additional info:
Comment 1 Kevin Kofler 2010-07-21 22:07:41 EDT
Are you sure your Fedora 12 outputs aren't swapped? If anything, I'd expect C to use the ISO format (yyyy-mm-dd). en_US.UTF-8 should use the US format.

FYI, LC_TIME=ja_JP.UTF-8 is an effective way to force the format you want.
Comment 2 kc8hfi 2010-07-21 22:10:55 EDT
Either way, it don't matter.  You can set the LANG environment variable to anything and the date format doesn't change.  both en_US.UTF-8 and C are showing the same format.  I was figuring that the format would be different for each type.
Comment 3 kc8hfi 2010-07-21 22:17:02 EDT
This is what is happening on an f12 system

Looking at the LANG variable,  
[kc8hfi@charlie perl]$ echo $LANG
en_US.UTF-8

The output of ls -l

[kc8hfi@charlie perl]$ ls -l
total 276
-rw-rw-r--. 1 kc8hfi kc8hfi    240 2010-05-03 19:38 client.pl

Now change the LANG variable to something else, like C

[kc8hfi@charlie perl]$ export LANG=C
[kc8hfi@charlie perl]$ ls -l
total 276
-rw-rw-r--. 1 kc8hfi kc8hfi    240 May  3 19:38 client.pl


Now, from an f13 system:
kc8hfi@bandit1 virtualmachines]$ echo $LANG
en_US.UTF-8
[kc8hfi@bandit1 virtualmachines]$ ls -l
total 17790060
-rw-r--r--. 1 kc8hfi kc8hfi 10737418240 Jun 16 16:50 f13-i686.img
-rw-r--r--. 1 kc8hfi kc8hfi 10737418240 Jun 24 07:18 f13-x86_64.img

and then if you change the LANG variable

[kc8hfi@bandit1 virtualmachines]$ export LANG=C
[kc8hfi@bandit1 virtualmachines]$ echo $LANG
C
[kc8hfi@bandit1 virtualmachines]$ ls -l
total 17790060
-rw-r--r--. 1 kc8hfi kc8hfi 10737418240 Jun 16 16:50 f13-i686.img
-rw-r--r--. 1 kc8hfi kc8hfi 10737418240 Jun 24 07:18 f13-x86_64.img


I was expecting to see the date format change.
Comment 4 Kevin Kofler 2010-07-21 22:52:17 EDT
Is LC_TIME set? And LC_ALL?

In the absence of other LC_* settings, the Fedora 12 behavior would be the bug. It's not normal for en_US.UTF-8 to display yyyy-mm-dd dates as this is not a format commonly used in the USA.
Comment 5 Ondrej Vasik 2010-07-22 04:50:03 EDT
Is it really present in F-13 coreutils? As I think this is duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=525134 ( ls shows ISO format when no localized translation for the date string is present - and therefore english translations for ls date formats were added to coreutils in 8.4 (which is present in F-13). See http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00388.html (and other emails in that thread) for details.
Comment 6 Ondrej Vasik 2010-07-22 04:55:33 EDT
Ah, now I see - the request is totally oposite ... you request the old ISO format to be back ... in fact until 2005, common timestamp style was used for en_* locales, so moving it to iso style was some kind of regression. So restoring the correct behaviour from the times before 2005 is not a bug. Closing NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.