<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://sourceware.org/bugzilla/bugzilla.dtd">

<bugzilla version="4.0.10"
          urlbase="http://sourceware.org/bugzilla/"
          
          maintainer="overseers@sourceware.org"
>

    <bug>
          <bug_id>2371</bug_id>
          
          <creation_ts>2006-02-21 00:50:00 +0000</creation_ts>
          <short_desc>Incorrect locale data causes problems with date display</short_desc>
          <delta_ts>2007-09-23 23:14:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>glibc</product>
          <component>localedata</component>
          <version>2.3.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jose M. daLuz">jdaluz</reporter>
          <assigned_to name="GNU C Library Locale Maintainers">libc-locales</assigned_to>
          <cc>aristophrenic</cc>
    
    <cc>glibc-bugs</cc>
    
    <cc>pacho</cc>
    
    <cc>toolchain</cc>
          <cf_gcchost>x86_64-pc-linux-gnu</cf_gcchost>
          <cf_gcctarget>x86_64-pc-linux-gnu</cf_gcctarget>
          <cf_gccbuild>x86_64-pc-linux-gnu</cf_gccbuild>
          

      

      

      

          <long_desc isprivate="0">
            <commentid>8538</commentid>
            <who name="Jose M. daLuz">jdaluz</who>
            <bug_when>2006-02-21 00:50:35 +0000</bug_when>
            <thetext>Originally I had a calendar that displayed Saturday as the first day of the
week, then switching from no locale set to LC_ALL=&quot;en_US&quot; the first day became
Monday -- in both cases it should have been Sunday. Here is the locale data:

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

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

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=&quot;&quot; above.

I&apos;m running glibc 2.3.5 on Gentoo 2005.1/AMD64, but other Gentoo users running
2.3.6 have the same problem. I&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>8542</commentid>
            <who name="Mike Frysinger">vapier</who>
            <bug_when>2006-02-21 02:14:16 +0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>8548</commentid>
            <who name="Jose M. daLuz">jdaluz</who>
            <bug_when>2006-02-21 02:23:17 +0000</bug_when>
            <thetext>*** Bug 2372 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>8921</commentid>
            <who name="Jose M. daLuz">jdaluz</who>
            <bug_when>2006-03-13 02:33:51 +0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>8946</commentid>
            <who name="Denis Barbier">barbier</who>
            <bug_when>2006-03-13 19:19:25 +0000</bug_when>
            <thetext>No, there is no such change in the C locale in glibc 2.4.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>8963</commentid>
            <who name="Jose M. daLuz">jdaluz</who>
            <bug_when>2006-03-14 04:19:02 +0000</bug_when>
            <thetext>(In reply to comment #4)
&gt; 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&apos;re quite right. So this
problem remains unchanged.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>13625</commentid>
            <who name="Jose M. daLuz">jdaluz</who>
            <bug_when>2006-11-27 21:33:05 +0000</bug_when>
            <thetext>With glibc 2.5, the problem seems to be fixed:

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

$ LANG=en_US locale -k -c LC_TIME
LC_TIME
abday=&quot;Sun;Mon;Tue;Wed;Thu;Fri;Sat&quot;
day=&quot;Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday&quot;
abmon=&quot;Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec&quot;
mon=&quot;January;February;March;April;May;June;July;August;September;October;November;December&quot;
am_pm=&quot;AM;PM&quot;
d_t_fmt=&quot;%a %d %b %Y %r %Z&quot;
d_fmt=&quot;%m/%d/%Y&quot;
t_fmt=&quot;%r&quot;
t_fmt_ampm=&quot;%I:%M:%S %p&quot;
era=
era_year=&quot;&quot;
era_d_fmt=&quot;&quot;
alt_digits=
era_d_t_fmt=&quot;&quot;
era_t_fmt=&quot;&quot;
time-era-num-entries=0
time-era-entries=&quot;S&quot;
week-ndays=7
week-1stday=19971130
week-1stweek=7
first_weekday=1
first_workday=1
cal_direction=1
timezone=&quot;&quot;
date_fmt=&quot;%a %b %e %H:%M:%S %Z %Y&quot;
time-codeset=&quot;UTF-8&quot;
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16756</commentid>
            <who name="Ulrich Drepper">drepper.fsp</who>
            <bug_when>2007-05-04 16:07:21 +0000</bug_when>
            <thetext>This was changed back on 2006-4-10.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16769</commentid>
            <who name="Pacho Ramos">pacho</who>
            <bug_when>2007-05-05 10:06:29 +0000</bug_when>
            <thetext>The bug is still valid. Please, see:
http://bugs.gentoo.org/show_bug.cgi?id=120995

Thanks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16773</commentid>
            <who name="Mike Frysinger">vapier</who>
            <bug_when>2007-05-05 23:31:00 +0000</bug_when>
            <thetext>post all relevant information here ... dont use links to other bugzillas please</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16778</commentid>
            <who name="Pacho Ramos">pacho</who>
            <bug_when>2007-05-06 10:04:50 +0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; post all relevant information here ... dont use links to other bugzillas please

(In reply to comment #9)
&gt; 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&apos;m on glibc 2.5 and I still have first_weekday=7 for LC_ALL=&quot;&quot;.  For
LC_ALL=&quot;en_US&quot; I get the correct first_weekday=1.

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

______________

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

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

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

_____________

And I put my output:

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

Thanks a lot
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>16813</commentid>
            <who name="Isaac">aristophrenic</who>
            <bug_when>2007-05-07 19:47:47 +0000</bug_when>
            <thetext>Related: bug &lt;a href=&quot;http://sources.redhat.com/bugzilla/show_bug.cgi?id=181&quot;&gt;
181 &lt;/a&gt;.
The patch in the related bug &quot;c-first-weekday.diff&quot; should patch the problem
where first_weekday=7 in the POSIX locale. POSIX locale is the default for
LC_TIME when LC_ALL=&quot;&quot;.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>19251</commentid>
            <who name="Ulrich Drepper">drepper.fsp</who>
            <bug_when>2007-09-23 23:14:37 +0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>