After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 554256 - Week starts with monday
Week starts with monday
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: usability
2.23.x
Other Linux
: Normal normal
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2008-09-29 06:28 UTC by Johannes Hessellund
Modified: 2008-09-29 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.21 KB, patch)
2008-09-29 12:29 UTC, Patryk Zawadzki
committed Details | Review

Description Johannes Hessellund 2008-09-29 06:28:49 UTC
Just installed hamster-applet for Ubuntu Hardy from the hamster.support ppa.

Showing the overview, weeks start with sunday.
However, in europe first day of the week is monday.

Would be great if this could be done by preferences.
Or I think evolution already knows this and hamster could get information about first day of week from evolution or some gconf-setting.

Great stuff this hamster-applet. ;-)
Comment 1 Toms Bauģis 2008-09-29 07:52:00 UTC
Hi Johannes!

It'd be good if bugs would be reported against trunk version of hamster (that is - built from sources), the process is quite simple[1].

Regarding bug - first day of week is decided upon your locale[2], make sure that the clock calendar is also starting with proper date, otherwise you've wrong locale set. 


Resolving as invalid, feel free to reopen.

[1] http://projecthamster.wordpress.com/building-and-running/
[2] bug 554256 comment 1
Comment 2 Toms Bauģis 2008-09-29 07:53:14 UTC
sorry, the correct link to bug is bug 548102 comment 1
Comment 3 Johannes Hessellund 2008-09-29 08:38:13 UTC
Sorry, I on my laptop, where I have not installed build system.

I think my locale settings are fine.

Output from locale
$ locale
LANG=da_DK.UTF-8
LC_CTYPE="da_DK.UTF-8"
LC_NUMERIC="da_DK.UTF-8"
LC_TIME="da_DK.UTF-8"
LC_COLLATE="da_DK.UTF-8"
LC_MONETARY="da_DK.UTF-8"
LC_MESSAGES="da_DK.UTF-8"
LC_PAPER="da_DK.UTF-8"
LC_NAME="da_DK.UTF-8"
LC_ADDRESS="da_DK.UTF-8"
LC_TELEPHONE="da_DK.UTF-8"
LC_MEASUREMENT="da_DK.UTF-8"
LC_IDENTIFICATION="da_DK.UTF-8"
LC_ALL=

But
$ locale first_weekday
1

Not sure where the problem is.
Evolution and gnome clock show weeks starting with monday alright.

In gconf the key /apps/evolution/calendar/display/week_start_day says 1. The help says
1 = monday
0 = sunday

Comment 4 Toms Bauģis 2008-09-29 08:42:14 UTC
with what day does the week start in your clock applet calendar?
Comment 5 Johannes Hessellund 2008-09-29 09:33:12 UTC
with monday
Comment 6 Patryk Zawadzki 2008-09-29 09:37:12 UTC
Didn't hamster just run "locale first_weekday" internally to check that?
Comment 7 Toms Bauģis 2008-09-29 09:43:42 UTC
i think this is related

http://sourceware.org/ml/glibc-bugs/2007-07/msg00201.html
Comment 8 Johannes Hessellund 2008-09-29 09:49:02 UTC
Are you sure 
1 = sunday ?

Shouldn't
0 = sunday
and
1 = monday

or is this a locale bug?

Maybe hamster should just rely on evolutions gconf entry
/apps/evolution/calendar/display/week_start_day

Where 0=sunday and 1=monday ... 6=saturday.
Comment 9 Patryk Zawadzki 2008-09-29 09:53:38 UTC
Hamster can't depend on that key as it's not set if you don't use Evolution (I don't).

$ locale first_weekday
1

And Hamster does show Monday as the first day of week. Which precise version of Hamster are you using?
Comment 10 Johannes Hessellund 2008-09-29 10:02:53 UTC
I use the version for hardy.
deb  http://ppa.launchpad.net/hamster.support/ubuntu hardy main

About dialog says: 2.23.93
Comment 11 Toms Bauģis 2008-09-29 10:17:14 UTC
in glib or which one is responsible, 1=sunday, 2=monday
Comment 12 Patryk Zawadzki 2008-09-29 12:25:33 UTC
It is perfectly valid for first_weekday=1 to mean Monday. Reopening.
Comment 13 Patryk Zawadzki 2008-09-29 12:29:02 UTC
Created attachment 119575 [details] [review]
Proposed patch

While locale manual is outdated, we should use week-1stday (beginning of first tracked week of Unix time) + week_firstday (1-based offset of the first day of the week considered a weekday) to determine the correct day.
Comment 14 Patryk Zawadzki 2008-09-29 13:09:08 UTC
Fixed on gnome-2-24 branch in revision 580.

Fixed in trunk in revision 581.