Bug 56657 - locale info (LC_TIME, week-1stday) may be wrong in some locales
Summary: locale info (LC_TIME, week-1stday) may be wrong in some locales
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-23 14:59 UTC by Martin Norback
Modified: 2016-11-24 15:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-22 02:35:08 UTC
Embargoed:


Attachments (Terms of Use)

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.


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