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



Hi,

Sorry for sending this mail once again because I forgot the -u option when performing cvs diff:-)

This patch is aimed for trunk. We have found a bug in calendar which can be reproduced as follows:
1.Invoke your evolution
2.Create a new All-day event somewhere, for example, in 12/25
3.Print preview it
4.Save and close it
5.Froward it as iCalendar
6.Explore the message with calendar information
Actual result:
After #3,the time of appointment is from 12/25 8:00 to 12/26 8:00.
After #6,you will see that the start time is 12/25 and the end time is 12/26en.

I guess that's because of the invalid time zone and 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.2143
diff -u -r1.2143 ChangeLog
--- calendar/ChangeLog	9 Feb 2004 15:00:37 -0000	1.2143
+++ calendar/ChangeLog	10 Feb 2004 08:02:32 -0000
@@ -1,3 +1,8 @@
+2004-02-10  Kidd Wang  <kidd wang sun com>
+
+	* gui/print.c: (print_date_label): guarantee we do have some timezone
+	before the time convertion.
+
 2004-02-09  Rodrigo Moya <rodrigo ximian com>
 
 	* gui/gnome-cal.c (client_cal_opened_cb): don't add the clients to the
Index: calendar/gui/print.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/print.c,v
retrieving revision 1.65
diff -u -r1.65 print.c
--- calendar/gui/print.c	6 Feb 2004 03:03:44 -0000	1.65
+++ calendar/gui/print.c	10 Feb 2004 08:02:34 -0000
@@ -2215,6 +2215,8 @@
 	e_cal_component_get_dtstart (comp, &datetime);
 	if (datetime.value) {
 		start_zone = get_zone_from_tzid (client, datetime.tzid);
+		if (!start_zone)
+			start_zone = calendar_config_get_icaltimezone ();
 		start = icaltime_as_timet_with_zone (*datetime.value,
 						     start_zone);
 	}
@@ -2223,6 +2225,8 @@
 	e_cal_component_get_dtend (comp, &datetime);
 	if (datetime.value) {
 		end_zone = get_zone_from_tzid (client, datetime.tzid);
+		if (!end_zone)
+			end_zone = calendar_config_get_icaltimezone ();
 		end = icaltime_as_timet_with_zone (*datetime.value,
 						   end_zone);
 	}
@@ -2231,6 +2235,8 @@
 	e_cal_component_get_due (comp, &datetime);
 	if (datetime.value) {
 		due_zone = get_zone_from_tzid (client, datetime.tzid);
+		if (!due_zone)
+			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]