Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 56657

Summary: locale info (LC_TIME, week-1stday) may be wrong in some locales
Product: [Retired] Red Hat Linux Reporter: Martin Norback <d95mback>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: db, fweimer, goeran, menthos
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-22 02:35:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Norback 2001-11-23 14:59:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
The glibc locale info for weeks is wrong in some locales, for example the
de_DE locale info is like this

day="Sonntag;Montag;Dienstag;Mittwoch;Donnerstag;Freitag;Samstag"
week-ndays=7
week-1stday=19971201
week-1stweek=4

And, although I haven't found a specification of what these fields mean,
there is a working document at
http://std.dkuug.dk/JTC1/SC22/WG20/docs/n822-dtr14652.pdf
which defines a field week, which has scary similarities with week-ndays,
week-1stday and week-1stweek.

That document clearly states that the first entry in "day" should
correspond to the date given in week-1stday, but it doesn't, since 19971201
is a Monday, but Sonntag is Sunday in German.

Another example is what you get when you have C locale, then you get:

day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
first_weekday=7

first_weekday is defined in the above document to be the day that should be
shown first by a week calendar. However 7 means Saturday, and the default
should be 1 (Sunday).

Finally, the sv_SE locale is wrong, since Sweden has been using ISO 8601
some time, and therefore should use Monday as first day of the week instead
of Sunday.

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


How reproducible:
Always

Steps to Reproduce:
env LC_TIME=C locale -k LC_TIME
env LC_TIME=de_DE locale -k LC_TIME
env LC_TIME=sv_SE locale -k LC_TIME
	

Additional info:

Also see bug #56513
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=56513

Comment 1 Christian Rose 2002-12-22 11:29:51 UTC
I split the part about the sv_SE locale info into a bug report of its own, bug
80212.

Comment 2 Ulrich Drepper 2003-04-22 02:35:08 UTC
The locale files have to contain the sdata always in the form which has the
translation for Sunday first.  Regardless of what other documents say.  All
locale files comply with this AFAIK.  No bug.