aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorsimon.zheng <simon.zheng@sun.com>2007-04-09 10:47:12 +0800
committerSimon Zheng <simonz@src.gnome.org>2007-04-09 10:47:12 +0800
commit2bbcbc6e9db888ec831d28a8006017db34cde604 (patch)
tree30d35917c374d3c641b77ece2306b7b3038d650f /addressbook/gui
parent96e5dc161fc6bb7ac376988c570d393a1d294e9d (diff)
downloadgsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar.gz
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar.bz2
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar.lz
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar.xz
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.tar.zst
gsoc2013-evolution-2bbcbc6e9db888ec831d28a8006017db34cde604.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=/trunk/; revision=33400
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 311af261be..d243d93bb1 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -415,17 +415,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);
}