[Bug localedata/2371] New: Incorrect locale data causes problems with date display

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] New: Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
Originally I had a calendar that displayed Saturday as the first day of the
week, then switching from no locale set to LC_ALL="en_US" the first day became
Monday -- in both cases it should have been Sunday. Here is the locale data:

LC_ALL="" locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %b %e %H:%M:%S %Y"
d_fmt="%m/%d/%y"
t_fmt="%H:%M:%S"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries=""
week-ndays=7
week-1stday=19971130
week-1stweek=4
first_weekday=7
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ANSI_X3.4-1968"

week-1stday=19971130 which is a Sunday. first_weekday=7 which is Saturday,
which is very wrong -- it should be 1 instead. This combo makes Saturday first
day of the week.

LC_ALL=en_US locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971201
week-1stweek=4
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ISO-8859-1"

week-1stday=19971201 which is a Monday, so with first_weekday=1 Monday becomes
the first day of the week in the calendar, which in the US is wrong.
week-1stday should be the same as in LC_ALL="" above.

I'm running glibc 2.3.5 on Gentoo 2005.1/AMD64, but other Gentoo users running
2.3.6 have the same problem. I've already reported this on Gentoo bugzilla and
was directed to report upstream.

kernel 2.6.15-ck3-r1 #1 PREEMPT Tue Feb 7 23:17:53 EST 2006 x86_64 AMD
Athlon(tm) 64 Processor 3000+ GNU/Linux

gcc -v
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/specs
Configured with: /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.5
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.5/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include/g++-v3
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --enable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)

ld -v
GNU ld version 2.16.91.0.6 20060212

--
           Summary: Incorrect locale data causes problems with date display
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
        AssignedTo: libc-locales at sources dot redhat dot com
        ReportedBy: jdaluz at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com,toolchain at
                    gentoo dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de

------- Additional Comments From vapier at gentoo dot org  2006-02-21 02:14 -------
you can find similar reports against Ubuntu:
https://launchpad.net/distros/ubuntu/+source/langpack-locales/+bug/31814/
and Debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347323

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From jdaluz at gmail dot com  2006-02-21 02:23 -------
*** Bug 2372 has been marked as a duplicate of this bug. ***

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From jdaluz at gmail dot com  2006-03-13 02:33 -------
I updated to glibc 2.4. The locale data is updated and now Monday is the
first_weekday for the C locale, en_US and en_US.UTF-8. For the US this should
still be Sunday with first_workday as Monday.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From barbier at linuxfr dot org  2006-03-13 19:19 -------
No, there is no such change in the C locale in glibc 2.4.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From jdaluz at gmail dot com  2006-03-14 04:19 -------
(In reply to comment #4)
> No, there is no such change in the C locale in glibc 2.4.

Sorry, I mistook an empty locale for the C locale. You're quite right. So this
problem remains unchanged.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From jdaluz at gmail dot com  2006-11-27 21:33 -------
With glibc 2.5, the problem seems to be fixed:

$ LANG=en_US.UTF-8 locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=7
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"

$ LANG=en_US locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=7
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"


--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From drepper at redhat dot com  2007-05-04 16:07 -------
This was changed back on 2006-4-10.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From pacho at condmat1 dot ciencias dot uniovi dot es  2007-05-05 10:06 -------
The bug is still valid. Please, see:
http://bugs.gentoo.org/show_bug.cgi?id=120995

Thanks

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de


--
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pacho at condmat1 dot
                   |                            |ciencias dot uniovi dot es


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From vapier at gentoo dot org  2007-05-05 23:31 -------
post all relevant information here ... dont use links to other bugzillas please

--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From pacho at condmat1 dot ciencias dot uniovi dot es  2007-05-06 10:04 -------
(In reply to comment #9)
> post all relevant information here ... dont use links to other bugzillas please

(In reply to comment #9)
> post all relevant information here ... dont use links to other bugzillas please

OK. I will reproduce some (I think) useful messages:

http://bugs.gentoo.org/show_bug.cgi?id=120995#c21

I'm on glibc 2.5 and I still have first_weekday=7 for LC_ALL="".  For
LC_ALL="en_US" I get the correct first_weekday=1.

cbm@aconite ~ $ LC_ALL="en_US" locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=7
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ISO-8859-1"
cbm@aconite ~ $ LC_ALL="" locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %b %e %H:%M:%S %Y"
d_fmt="%m/%d/%y"
t_fmt="%H:%M:%S"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries=""
week-ndays=7
week-1stday=19971130
week-1stweek=4
first_weekday=7
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ANSI_X3.4-1968"
cbm@aconite ~ $

______________

http://bugs.gentoo.org/show_bug.cgi?id=120995#c22

I have LANG set to en_US.UTF-8. However:

LC_ALL="" locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %r %Z"
d_fmt="%m/%d/%Y"
t_fmt="%r"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=7
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"

_____________

And I put my output:

(10:39:21) pacho@belkin2 ~ $ LC_ALL="es_ES.UTF-8" locale -k -c LC_TIME
LC_TIME
abday="dom;lun;mar;mié;jue;vie;sáb"
day="domingo;lunes;martes;miércoles;jueves;viernes;sábado"
abmon="ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic"
mon="enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiembre;octubre;noviembre;diciembre"
am_pm=";"
d_t_fmt="%a %d %b %Y %T %Z"
d_fmt="%d/%m/%y"
t_fmt="%T"
t_fmt_ampm=""
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="d"
week-ndays=7
week-1stday=19971130
week-1stweek=0
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="UTF-8"
(10:39:23) pacho@belkin2 ~ $

Thanks a lot


--


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From aristophrenic at warpmail dot net  2007-05-07 19:47 -------
Related: bug <a href="http://sources.redhat.com/bugzilla/show_bug.cgi?id=181">
181 </a>.
The patch in the related bug "c-first-weekday.diff" should patch the problem
where first_weekday=7 in the POSIX locale. POSIX locale is the default for
LC_TIME when LC_ALL="".

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aristophrenic at warpmail
                   |                            |dot net


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/2371] Incorrect locale data causes problems with date display

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From drepper at redhat dot com  2007-09-23 23:14 -------
I have no idea what people complain here.  They are absolutely incapable of
specifying a problem.  Just showing some program output is in no universe a
suitable way.

The current libc code shows a Sunday as the first day in the US locale and
Monday as the first day in the the Spanish locale.  The former is definitely
correct and the latter is what people requested in the past.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=2371

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.