Bug 201510 - GtkCalendar starts on Saturday in POSIX
GtkCalendar starts on Saturday in POSIX
Product: Fedora
Classification: Fedora
Component: gtk2 (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Matthias Clasen
Depends On:
  Show dependency treegraph
Reported: 2006-08-06 16:24 EDT by David Nečas
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-28 02:06:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Nečas 2006-08-06 16:24:43 EDT
Description of problem:
In POSIX locale GtkCalendar starts weeks with Saturday.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create calendar.c:

#include <gtk/gtk.h>

main(int argc,
     char *argv[])
    GtkWidget *window, *w;

    gtk_init(&argc, &argv);
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);

    w = gtk_calendar_new();
    gtk_container_add(GTK_CONTAINER(window), w);


    return 0;

2. Compile it

gcc $(pkg-config --cflags --libs gtk+-2.0) -o calendar calendar.c

3. Run it

LC_TIME=POSIX ./calendar
Actual results:
It shows a calendar with Saturday as the first day of the week.

Expected results:
I'm not sure if POSIX says anything about the first day of the week, anyway
Saturday is eccentric, so probably Sunday.
Comment 1 David Nečas 2006-08-10 17:14:32 EDT
The calculation in gtk_calendar_init() for POSIX goes:

first_weekday = 7
week_origin = 19971130
week_1stday = 0
priv->week_start = 6

I don't understand why priv->week_start is computed as it's computed I can't
tell anything more.
Comment 2 Matthias Clasen 2006-08-28 02:06:06 EDT
This is a bug in the glibc localedata, see

Note You need to log in before you can comment on or make changes to this bug.