Bug 56196 - /etc/profile.d/lang.sh should set TIME_STYLE also
Summary: /etc/profile.d/lang.sh should set TIME_STYLE also
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2001-11-13 20:17 UTC by Enrico Scholz
Modified: 2014-03-17 02:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-05 00:49:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Enrico Scholz 2001-11-13 20:17:13 UTC
Description of Problem:

Recent fileutils are honoring the TIME_STYLE env-variable which is assumed
to be `posix-iso' by default. Compared with older versions (defaulted to
`locale'), this is an unexpected behavior:

$ TIME_STYLE=locale /bin/ls -l X; unset TIME_STYLE && /bin/ls -l X
-rw-rw-r--    1 ensc     ensc            0 Nov 13 21:13 X
-rw-rw-r--    1 ensc     ensc            0 11-13 21:13 X

Therefore, I suggest to set this variable somewhere in the initscripts (and
make it userconfigurable e.g. by locale_config). /etc/profile.d/lang.sh
seems to be a reasonable place.

Additional Information:

$ rpm -q initscripts fileutils

Comment 1 Richard Lloyd 2002-07-14 15:33:03 UTC
Just a note that this hasn't been fixed in the latest Red Hat Beta
(Limbo - 7.3.92) and has the potential to break any shell script that
parses the output from "ls -l", particularly since if a file is >6 months
old, the "ls -l" output displays the date in "YYYY-MM-DD" format, reducing
the number of space-separated date fields from 2 to 1 of course.

As the reporter says, you can set TIME_STYLE="locale" (or, if you must,
supply "--time-style=locale"), but you've got to wonder why the GNU fileutils
folks actually made posix-iso the default, rather than locale (the latter
of which has been the default pretty well since UNIX began). Maybe it's
the fileutils team that need to fix this, rather than it just being a
Red Hat fix ? I bet a lot of other distros get bitten by this when they
upgrade their fileutils packages...

Comment 2 Miloslav Trmac 2004-02-05 00:49:07 UTC
coreutils-5.0.24 use the "locale" format unless POSIXLY_CORRECT is set,
so this is not needed anymore.

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