[arch-general] Funny locale settings, Gnome versus command line
I just noticed something rather irritating, in my Gnome clock applet the week starts on Tuesday. It would be much better if it started on Monday. While trying (and failing) to find out why this was I ran `cal` on the command line, in `cal` the week starts on Sunday. Again I'd like it to start on Monday. I also noticed that Gnome's tool to set time and date (System -> Administration -> Time and Date) correctly shows the week as starting on Monday. In my rc.conf I set the locale to en_GB.UTF-8, and my terminal seems to agree with me: % locale LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE=C LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL= How do I get the Gnome clock to start the week on Monday? How do I get `cal` to start the week on Monday? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
hello, On Wed, Jun 03, 2009 at 09:21:27AM +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday? no idea.
How do I get `cal` to start the week on Monday? cal -m --
On Wed, Jun 3, 2009 at 9:27 AM, vlad <vla@uni-bonn.de> wrote:
hello,
On Wed, Jun 03, 2009 at 09:21:27AM +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday? no idea.
How do I get `cal` to start the week on Monday? cal -m
Are you saying that cal doesn't honour the locale settings and that the only way is to use a command line argument? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Wed, Jun 3, 2009 at 9:30 AM, Magnus Therning <magnus@therning.org> wrote:
On Wed, Jun 3, 2009 at 9:27 AM, vlad <vla@uni-bonn.de> wrote:
hello,
On Wed, Jun 03, 2009 at 09:21:27AM +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday? no idea.
How do I get `cal` to start the week on Monday? cal -m
Are you saying that cal doesn't honour the locale settings and that the only way is to use a command line argument?
Reading the code for cal it looks like it _should_ consider the locale [1]. /M [1]: http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=misc... -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Wed, Jun 03, 2009 at 09:41:56AM +0100, Magnus Therning wrote:
Reading the code for cal it looks like it _should_ consider the locale [1]. [1]: http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=misc...
cal always displayed Sunday as the first day of the week. Your link points to HEAD in git, not to the current Arch Linux version, util-linux-ng 2.14.2.
Util-linux-ng 2.15 Release Notes (05-May-2009) cal(1): - determines the first day of week from the locale.
On Wed, Jun 3, 2009 at 10:06 AM, Alessandro Doro <ordo.ad@gmail.com> wrote:
On Wed, Jun 03, 2009 at 09:41:56AM +0100, Magnus Therning wrote:
Reading the code for cal it looks like it _should_ consider the locale [1]. [1]: http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=misc...
cal always displayed Sunday as the first day of the week.
Your link points to HEAD in git, not to the current Arch Linux version, util-linux-ng 2.14.2.
Util-linux-ng 2.15 Release Notes (05-May-2009) cal(1): - determines the first day of week from the locale.
Ah, OK. I didn't even consider that Arch might have an out-of-date util-linux-ng ;-) I found a conversation from 2001 regarding this behaviour in the original cal, I didn't think it would take 8 years to make it into the version in util-linux-ng. Thanks for pointing that out. Anyway, the Gnome clock applet IS starting the week on the wrong day (I'm not even aware if there is a single locale that starts the week on Tuesday :-) ) /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
On Wed, Jun 3, 2009 at 9:33 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
Yes, I've heard of the problems with glibc upstream. However, looking through the patches that Debian has they don't seem to be related to first weekday at all :-( /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Wed, 2009-06-03 at 09:58 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 9:33 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
Yes, I've heard of the problems with glibc upstream.
However, looking through the patches that Debian has they don't seem to be related to first weekday at all :-(
They have had quite some weekday fixes for a while, but since they moved to eglibc instead of glibc, these fixes have been merged in the new upstream.
On Wed, Jun 3, 2009 at 10:27 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:58 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 9:33 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
Yes, I've heard of the problems with glibc upstream.
However, looking through the patches that Debian has they don't seem to be related to first weekday at all :-(
They have had quite some weekday fixes for a while, but since they moved to eglibc instead of glibc, these fixes have been merged in the new upstream.
I did make sure to look at the glibc sources rather than the eglibc sources. first_weekday and first_workday are both set to 2 which matches other locales that I know uses Monday as first weekday as well. Given that the version of cal in Arch doesn't use locale, is there some other tool that definately, without any doubt, uses locale so I can double check. So far it looks like the Gnome clock applet is broken, but I'd like to confirm, beyond any doubt, that the en_GB locale is correct before I raise bugs. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
On Wed, 2009-06-03 at 10:46 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 10:27 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:58 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 9:33 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
Yes, I've heard of the problems with glibc upstream.
However, looking through the patches that Debian has they don't seem to be related to first weekday at all :-(
They have had quite some weekday fixes for a while, but since they moved to eglibc instead of glibc, these fixes have been merged in the new upstream.
I did make sure to look at the glibc sources rather than the eglibc sources.
first_weekday and first_workday are both set to 2 which matches other locales that I know uses Monday as first weekday as well.
Given that the version of cal in Arch doesn't use locale, is there some other tool that definately, without any doubt, uses locale so I can double check. So far it looks like the Gnome clock applet is broken, but I'd like to confirm, beyond any doubt, that the en_GB locale is correct before I raise bugs.
It appears this bug has been fixed upstream, but not correctly :) http://sourceware.org/bugzilla/show_bug.cgi?id=7068 I think you might want to check the last patch, and revert the change done to the en_GB locale. It seems first_weekday and first_workday are set relative to the week statement above it.
On Wed, Jun 3, 2009 at 10:59 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 10:46 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 10:27 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:58 +0100, Magnus Therning wrote:
On Wed, Jun 3, 2009 at 9:33 AM, Jan de Groot <jan@jgc.homeip.net> wrote:
On Wed, 2009-06-03 at 09:21 +0100, Magnus Therning wrote:
How do I get the Gnome clock to start the week on Monday?
By fixing the locale definition in glibc. Really, this has been fixed by other distributions a long time ago, but I think the patch was lost on some upgrade we did to our glibc package a while ago. As you might know, upstream doesn't accept patches for things like locale bugs. Debian has patches for over 50 locales, that's why they switched to eglibc instead of glibc now.
Yes, I've heard of the problems with glibc upstream.
However, looking through the patches that Debian has they don't seem to be related to first weekday at all :-(
They have had quite some weekday fixes for a while, but since they moved to eglibc instead of glibc, these fixes have been merged in the new upstream.
I did make sure to look at the glibc sources rather than the eglibc sources.
first_weekday and first_workday are both set to 2 which matches other locales that I know uses Monday as first weekday as well.
Given that the version of cal in Arch doesn't use locale, is there some other tool that definately, without any doubt, uses locale so I can double check. So far it looks like the Gnome clock applet is broken, but I'd like to confirm, beyond any doubt, that the en_GB locale is correct before I raise bugs.
It appears this bug has been fixed upstream, but not correctly :)
http://sourceware.org/bugzilla/show_bug.cgi?id=7068
I think you might want to check the last patch, and revert the change done to the en_GB locale. It seems first_weekday and first_workday are set relative to the week statement above it.
Thanks, I'll modify my locale file (again) and see what happens. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
participants (4)
-
Alessandro Doro
-
Jan de Groot
-
Magnus Therning
-
vlad