aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-04 03:23:16 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-04 03:23:16 +0800
commit605eda115a7061488d2fb0e4264338598ea904d4 (patch)
treed89f84d2c14ff39140e063a3bbdd635ec58ac264 /embed/mozilla
parent34fa8474852c0efb0002dba6ad8daffbee1177d5 (diff)
downloadgsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar.gz
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar.bz2
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar.lz
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar.xz
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.tar.zst
gsoc2013-epiphany-605eda115a7061488d2fb0e4264338598ea904d4.zip
Fix strftime(3) usage.
2003-12-03 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GtkNSSDialogs.cpp: * src/pdm-dialog.c: (show_cookies_properties): Fix strftime(3) usage.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index 410293e52..94d8e9527 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -391,7 +391,8 @@ GtkNSSDialogs::ConfirmCertExpired (nsIInterfaceRequestor *ctx,
nsAutoString commonName;
time_t t;
struct tm tm;
- char formattedDate[32];
+ char formattedDate[128];
+ char *fdate;
const char *primary, *text;
char *ttCommonName, *secondary, *msg;
@@ -430,11 +431,12 @@ GtkNSSDialogs::ConfirmCertExpired (nsIInterfaceRequestor *ctx,
* strftime(3) */
strftime (formattedDate, sizeof(formattedDate), _("%a %d %b %Y"),
localtime_r (&t, &tm));
+ fdate = g_locale_to_utf8 (formattedDate, -1, NULL, NULL, NULL);
ttCommonName = g_strdup_printf ("\"<tt>%s</tt>\"",
NS_ConvertUCS2toUTF8(commonName).get());
- secondary = g_strdup_printf (text, ttCommonName, formattedDate);
+ secondary = g_strdup_printf (text, ttCommonName, fdate);
msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n\n%s",
primary, secondary,
@@ -442,6 +444,7 @@ GtkNSSDialogs::ConfirmCertExpired (nsIInterfaceRequestor *ctx,
int res = display_cert_warning_box (ctx, cert, msg, NULL, NULL, NULL);
+ g_free (fdate);
g_free (msg);
g_free (secondary);
g_free (ttCommonName);