Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 56196 - /etc/profile.d/lang.sh should set TIME_STYLE also
/etc/profile.d/lang.sh should set TIME_STYLE also
Product: Red Hat Raw Hide
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-11-13 15:17 EST by Enrico Scholz
Modified: 2014-03-16 22:24 EDT (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-11-13 15:17:13 EST
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 11:33:03 EDT
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-04 19:49:07 EST
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.