diff options
author | simon.zheng <simon.zheng@sun.com> | 2007-04-09 10:50:20 +0800 |
---|---|---|
committer | Simon Zheng <simonz@src.gnome.org> | 2007-04-09 10:50:20 +0800 |
commit | e85600260d923bb8741d914f14262ff12afcd263 (patch) | |
tree | 8fdad39e317a416402e7d76027f1d1ff31b1056f | |
parent | 2bf374941d64d2eabded23db96d6d250e4c219eb (diff) | |
download | gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar.gz gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar.bz2 gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar.lz gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar.xz gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.tar.zst gsoc2013-evolution-e85600260d923bb8741d914f14262ff12afcd263.zip |
** Fix for bug #426487
2007-04-09 simon.zheng <simon.zheng@sun.com>
** Fix for bug #426487
* gui/widgets/eab-contact-display.c: (accum_time_attribute):
strftime() supplied by OS is subject to locale encoding, i.e.
ja_JP.PCK. Using g_date_strftime() instead, which works on a
UTF-8 format string and store a UTF-8 result.
svn path=/branches/gnome-2-18/; revision=33401
-rw-r--r-- | addressbook/ChangeLog | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 13 |
2 files changed, 15 insertions, 7 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index a8d44ff84e..0db53a0a87 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,14 @@ 2007-04-09 simon.zheng <simon.zheng@sun.com> + ** Fix for bug #426487 + + * gui/widgets/eab-contact-display.c: (accum_time_attribute): + strftime() supplied by OS is subject to locale encoding, i.e. + ja_JP.PCK. Using g_date_strftime() instead, which works on a + UTF-8 format string and store a UTF-8 result. + +2007-04-09 simon.zheng <simon.zheng@sun.com> + ** Fix for bug #426829. * gui/contact-editor/eab-editor.c: (eab_editor_confirm_delete): diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index b2425048dd..f7694c8d2c 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -420,17 +420,16 @@ static void accum_time_attribute (GString *gstr, EContact *contact, const char *html_label, EContactField field, const char *icon, unsigned int html_flags) { EContactDate *date; - struct tm tdate; + GDate *gdate = NULL; char sdate[100]; date = e_contact_get (contact, field); - memset (&tdate, 0, sizeof (struct tm)); - if (date) { - tdate.tm_year = date->year-1900; - tdate.tm_mday = date->day; - tdate.tm_mon = date->month-1; - strftime (sdate, 100, "%x", &tdate); + gdate = g_date_new_dmy ( date->day, + date->month, + date->year ); + g_date_strftime (sdate, 100, "%x", gdate); + g_date_free (gdate); accum_name_value (gstr, html_label, sdate, icon, html_flags); e_contact_date_free (date); } |