Ubuntu

calendar - week starts on the wrong day for locale

Reported by stomlinson on 2005-09-06
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
langpack-locales (Ubuntu)
Medium
Unassigned

Bug Description

My locale is en_GB, but the calendar on the panel shows the week starting on Sunday, the 7th day, the day of rest.

It should be Mon -> Sun.

Paul Sladen (sladen) wrote :

ISO standard 8601 agrees with a week starting on Monday:

  http://www.cl.cam.ac.uk/~mgk25/iso-time.html#date

Changed in gnome-panel:
assignee: nobody → gnome
Changed in gnome-panel:
assignee: gnome → nobody
Amos Brocco (mriya3) wrote :

Same problem here.
I'm using locale 'it-CH' (Italian, Switzerland). The week should start on monday, but the clock/calendar applet in gnome-panel, as well as with the 'cal' command, it (incorrectly) make it start on sunday.

I've manually fixed the problem following instruction at http://www.ubuntuforums.org/showpost.php?p=658889&postcount=14

btw I hope it gets officially fixed in the 'locales' package

I live in Sweden. I choose English as my language at install, because I like that better. I choose Sweden as my location, because well, that's where I live and that's my time zone. Ubuntu handles daylight savings correctly, on the right day (which is different from the US) , so it has my location correct.

In Sweden, the week starts at monday, but there is no way to set that - why am I not allowed to choose another language without having the week broken? At the very least, why does this not depend on location/time zone? Daylight savings does.

What would happen if I as a native Swedish speaker set my interface to Swedish but moved and lived someplace where the weeks starts on sunday or saturday? What then?

This has to be a settable option, because it seems impossble to guess (unless you go by location instead of language). Made all so much more clear now that I got my Google Calendar and of less than 10 settings, that was one.

Oh, and I followed the instructions in the forum link mentioned above. That set my start of week to saturday for some reason.

Thanks.

Thurston (thurston-eml) wrote :

A work around...

You need to find a locale with "first_weekday 2" in the LC_TIME section.
Try this:
   grep first_weekday /usr/share/i18n/locales/* | grep en_

and you should get ...
/usr/share/i18n/locales/en_AU:first_weekday 1
/usr/share/i18n/locales/en_CA:first_weekday 1
/usr/share/i18n/locales/en_DK:first_weekday 2
/usr/share/i18n/locales/en_GB:first_weekday 1
/usr/share/i18n/locales/en_HK:first_weekday 1
/usr/share/i18n/locales/en_IE:first_weekday 2
/usr/share/i18n/locales/en_IN:first_weekday 1
/usr/share/i18n/locales/en_NZ:first_weekday 1
/usr/share/i18n/locales/en_PH:first_weekday 1
/usr/share/i18n/locales/en_SG:first_weekday 1
/usr/share/i18n/locales/en_US:first_weekday 1
/usr/share/i18n/locales/en_ZA:first_weekday 1

so if en_DK or en_IE is OK for you then use that.

If you really want to stay with en_GB, and you can't wait for them to fix this upstream, then you can patch your own copy of en_GB and recompile it. Like this:

cd ~
cp /usr/share/i18n/locales/en_GB .

then edit ~/en_GB and change the line that says
 first_weekday 1
to
  first_weekday 2

next use localedef to recompile it. Like this:

  cd ~
  mkdir locale
  localedef -c -i en_GB -f UTF-8 locale/en_GB.utf8

when it is done, overwrite the relevant LC_TIME component with your new one

  sudo cp ~/locale/en_GB.utf8/LC_TIME /usr/lib/locale/en_GB.utf8/

Use at your own risk, but it works for me (Dapper 6.06). See attached screenshot

Does this mean that for me (Sweden), there's just an appropriate en_SE entry missing (as DK for instance has one)? Would adding one make this "just work"(TM) when choosing language and location as before?

Thurston (thurston-eml) wrote :

Yes.

I don't think that the standard locales package provides en_SE, so you are free to add one (with the proviso that it might get deleted when you upgrade any package that thinks it owns the locale directories).

Just copy a suitable starting point, say en_DK, edit it to make it say what you want, then recompile as above subtituting en_SE for en_GB in my instructions. You would need to copy the whole of the output directory produced instead of just the LC_TIME part.

You may find that some non-GTK X applications complain about your locale though. Normally this means that they will defauilt to the "C" locale. You may need to do some more investigation.

You might also try to get en_SE added to the locales package.

Paul Dufresne (paulduf) wrote :

Confirming based on Paul Sladen comment.
Please keep in mind that anybody can confirm a bug.

Changed in libc:
status: Unconfirmed → Confirmed
Martin Pitt (pitti) wrote :

I just noticed that this is already fixed in Feisty.

Changed in langpack-locales:
status: Confirmed → Fix Released

Not fixed for en_SE (not existing still), but using en_GB finally gives me a calendar starting on Monday at least. Just hope there are no ill side effects otherwise.

Is there any easier way to configure this without installing localeconf and messing around with that?

On Wed, 30 May 2007 11:30:37 -0000, "Kristoffer Lundén"
<email address hidden> said:

> Is there any easier way to configure this without installing localeconf
> and messing around with that?

I've not found one.

My only suggestion is that you complain to the Gnome panel applet team
loudly. The current design of depending on the locale is broken in my
opinion. Thanks for your email, Toby
--
  Toby Thurston
  <email address hidden>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers