diff options
author | Milan Crha <mcrha@redhat.com> | 2009-07-03 16:27:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-07-03 16:27:36 +0800 |
commit | d1f3e3514e8a35b62950aff3ffd7beceff94c807 (patch) | |
tree | ad9aef396b42c04cc29960b1c0074a5254ce02b1 | |
parent | e013e10cc54fae7ad8409aa65c4731331ed6000a (diff) | |
download | gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar.gz gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar.bz2 gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar.lz gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar.xz gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.tar.zst gsoc2013-evolution-d1f3e3514e8a35b62950aff3ffd7beceff94c807.zip |
Bug #525689 - Do not show all days as Sunday in a comp-editor
-rw-r--r-- | widgets/misc/e-dateedit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 84b016934e..1d69016b20 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1729,12 +1729,18 @@ e_date_edit_update_date_entry (EDateEdit *dedit) %x the preferred date representation for the current locale without the time, but has forced to use 4 digit year */ gchar *format = e_time_get_d_fmt_with_4digit_year (); + time_t tt; tmp_tm.tm_year = priv->year; tmp_tm.tm_mon = priv->month; tmp_tm.tm_mday = priv->day; tmp_tm.tm_isdst = -1; + /* initialize all 'struct tm' members properly */ + tt = mktime (&tmp_tm); + if (tt && localtime (&tt)) + tmp_tm = *localtime (&tt); + e_utf8_strftime (buffer, sizeof (buffer), format, &tmp_tm); g_free (format); gtk_entry_set_text (GTK_ENTRY (priv->date_entry), buffer); |