[evolution-patches] A patch for calendar based on trunk



Hi,

Here's a patch aimed for trunk. We have found a bug in calendar which can be reproduced as follows:
1.Invoke your evolution
2.Import an all-day event which was exported from another machine with different time zone settings from yours
3.Open that all-day event
4.Print and Preview it

Actual result:
After #4, you can see that the all-day event appears in the form like "Tue 02/24/2004 01:00 PM to Wed 02/25/2004 01:00 PM",
rather than "Tue 02/24/2004 to Wed 02/25/2004"
Enclosed is a patch to fix that. Would you like to spend a little time to review it?

Best regards
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2163
diff -u -r1.2163 ChangeLog
--- calendar/ChangeLog	18 Feb 2004 22:38:30 -0000	1.2163
+++ calendar/ChangeLog	24 Feb 2004 06:56:27 -0000
@@ -1,3 +1,8 @@
+2004-02-24  Kidd Wang  <kidd wang sun com>
+
+	* gui/print.c: (print_date_label): ignore the timezone info of all-day
+	events.
+
 2004-02-18  Rodrigo Moya <rodrigo ximian com>
 
 	* gui/alarm-notify/alarm-notify.c (free_client_hash): remove the client
Index: calendar/gui/print.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/print.c,v
retrieving revision 1.66
diff -u -r1.66 print.c
--- calendar/gui/print.c	11 Feb 2004 05:26:48 -0000	1.66
+++ calendar/gui/print.c	24 Feb 2004 06:56:28 -0000
@@ -2215,7 +2215,7 @@
 	e_cal_component_get_dtstart (comp, &datetime);
 	if (datetime.value) {
 		start_zone = get_zone_from_tzid (client, datetime.tzid);
-		if (!start_zone)
+		if (!start_zone || datetime.value->is_date)
 			start_zone = calendar_config_get_icaltimezone ();
 		start = icaltime_as_timet_with_zone (*datetime.value,
 						     start_zone);
@@ -2225,7 +2225,7 @@
 	e_cal_component_get_dtend (comp, &datetime);
 	if (datetime.value) {
 		end_zone = get_zone_from_tzid (client, datetime.tzid);
-		if (!end_zone)
+		if (!end_zone || datetime.value->is_date)
 			end_zone = calendar_config_get_icaltimezone ();
 		end = icaltime_as_timet_with_zone (*datetime.value,
 						   end_zone);
@@ -2235,7 +2235,7 @@
 	e_cal_component_get_due (comp, &datetime);
 	if (datetime.value) {
 		due_zone = get_zone_from_tzid (client, datetime.tzid);
-		if (!due_zone)
+		if (!due_zone || datetime.value->is_date)
 			due_zone = calendar_config_get_icaltimezone ();
 		due = icaltime_as_timet_with_zone (*datetime.value,
 						   due_zone);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]