Blame SOURCES/evolution-3.12.11-calendar-task-datetime-fmt.patch

7d1446
diff -up evolution-3.12.11/calendar/gui/e-cal-component-preview.c.calendar-task-datetime-fmt evolution-3.12.11/calendar/gui/e-cal-component-preview.c
7d1446
--- evolution-3.12.11/calendar/gui/e-cal-component-preview.c.calendar-task-datetime-fmt	2014-07-07 12:56:09.000000000 +0200
7d1446
+++ evolution-3.12.11/calendar/gui/e-cal-component-preview.c	2016-03-17 09:50:06.870894068 +0100
7d1446
@@ -159,13 +159,11 @@ update_comp_info (ECalComponentPreview *
7d1446
 static gchar *
7d1446
 timet_to_str_with_zone (ECalComponentDateTime *dt,
7d1446
                         ECalClient *client,
7d1446
-                        icaltimezone *default_zone,
7d1446
-                        gboolean use_24_hour_format)
7d1446
+                        icaltimezone *default_zone)
7d1446
 {
7d1446
 	struct icaltimetype itt;
7d1446
 	icaltimezone *zone = NULL;
7d1446
 	struct tm tm;
7d1446
-	gchar buf[256];
7d1446
 
7d1446
 	if (dt->tzid != NULL) {
7d1446
 		e_cal_client_get_timezone_sync (
7d1446
@@ -179,11 +177,7 @@ timet_to_str_with_zone (ECalComponentDat
7d1446
 		icaltimezone_convert_time (&itt, zone, default_zone);
7d1446
 	tm = icaltimetype_to_tm (&itt;;
7d1446
 
7d1446
-	e_time_format_date_and_time (
7d1446
-		&tm, use_24_hour_format,
7d1446
-		FALSE, FALSE, buf, sizeof (buf));
7d1446
-
7d1446
-	return g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
7d1446
+	return e_datetime_format_format_tm ("calendar", "table", itt.is_date ? DTFormatKindDate : DTFormatKindDateTime, &tm;;
7d1446
 }
7d1446
 
7d1446
 static void
7d1446
@@ -193,7 +187,6 @@ cal_component_preview_write_html (ECalCo
7d1446
 	ECalClient *client;
7d1446
 	ECalComponent *comp;
7d1446
 	icaltimezone *default_zone;
7d1446
-	gboolean use_24_hour_format;
7d1446
 	ECalComponentText text;
7d1446
 	ECalComponentDateTime dt;
7d1446
 	gchar *str;
7d1446
@@ -208,7 +201,6 @@ cal_component_preview_write_html (ECalCo
7d1446
 	client = preview->priv->client;
7d1446
 	comp = preview->priv->comp;
7d1446
 	default_zone = preview->priv->timezone;
7d1446
-	use_24_hour_format = preview->priv->use_24_hour_format;
7d1446
 
7d1446
 	/* write document header */
7d1446
 	e_cal_component_get_summary (comp, &text);
7d1446
@@ -264,8 +256,7 @@ cal_component_preview_write_html (ECalCo
7d1446
 	/* write start date */
7d1446
 	e_cal_component_get_dtstart (comp, &dt);
7d1446
 	if (dt.value != NULL) {
7d1446
-		str = timet_to_str_with_zone (
7d1446
-			&dt, client, default_zone, use_24_hour_format);
7d1446
+		str = timet_to_str_with_zone (&dt, client, default_zone);
7d1446
 		g_string_append_printf (
7d1446
 			buffer, "%s%s",
7d1446
 			_("Start Date:"), str);
7d1446
@@ -276,8 +267,7 @@ cal_component_preview_write_html (ECalCo
7d1446
 	/* write end date */
7d1446
 	e_cal_component_get_dtend (comp, &dt);
7d1446
 	if (dt.value != NULL) {
7d1446
-		str = timet_to_str_with_zone (
7d1446
-			&dt, client, default_zone, use_24_hour_format);
7d1446
+		str = timet_to_str_with_zone (&dt, client, default_zone);
7d1446
 		g_string_append_printf (
7d1446
 			buffer,"%s%s",
7d1446
 			_("End Date:"), str);
7d1446
@@ -288,8 +278,7 @@ cal_component_preview_write_html (ECalCo
7d1446
 	/* write Due Date */
7d1446
 	e_cal_component_get_due (comp, &dt);
7d1446
 	if (dt.value != NULL) {
7d1446
-		str = timet_to_str_with_zone (
7d1446
-			&dt, client, default_zone, use_24_hour_format);
7d1446
+		str = timet_to_str_with_zone (&dt, client, default_zone);
7d1446
 		g_string_append_printf (
7d1446
 			buffer, "%s%s",
7d1446
 			_("Due Date:"), str);