[Commits] [SCM] claws branch, master, updated. 3.15.0-26-g73d4891

miras at claws-mail.org miras at claws-mail.org
Fri Apr 14 12:47:49 CEST 2017


The branch, master has been updated
       via  73d48910780a64de0deec8fe59e87318618f049a (commit)
      from  dbec2c7256e5397238932f3d228dcb1eaf4e8d40 (commit)

Summary of changes:
 src/plugins/vcalendar/vcal_manager.c     |    8 ++++----
 src/plugins/vcalendar/vcal_meeting_gtk.c |   14 +++++++-------
 src/plugins/vcalendar/vcalendar.c        |    4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)


- Log -----------------------------------------------------------------
commit 73d48910780a64de0deec8fe59e87318618f049a
Author: Michael Rasmussen <mir at datanom.net>
Date:   Fri Apr 14 12:47:41 2017 +0200

    Fix bug #3808: Replace icaltime_from_timet with icaltime_from_timet_with_zone

diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c
index a05ca36..251adc9 100644
--- a/src/plugins/vcalendar/vcal_manager.c
+++ b/src/plugins/vcalendar/vcal_manager.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Colin Leroy <colin at colino.net> and 
+ * Copyright (C) 1999-2017 Colin Leroy <colin at colino.net> and 
  * the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
@@ -395,7 +395,7 @@ gchar *vcal_manager_event_dump(VCalEvent *event, gboolean is_reply, gboolean is_
 	icalcomponent_add_property(ievent,
                 icalproperty_new_uid(event->uid));
 	icalcomponent_add_property(ievent,
-		icalproperty_vanew_dtstamp(icaltime_from_timet(time(NULL), TRUE), (void*)0));
+		icalproperty_vanew_dtstamp(icaltime_from_timet_with_zone(time(NULL), TRUE, NULL), (void*)0));
 	icalcomponent_add_property(ievent,
 		icalproperty_vanew_dtstart((icaltime_from_string(event->dtstart)), (void*)0));
 	icalcomponent_add_property(ievent,
@@ -423,9 +423,9 @@ gchar *vcal_manager_event_dump(VCalEvent *event, gboolean is_reply, gboolean is_
 	icalcomponent_add_property(ievent,
 		icalproperty_new_status(ICAL_STATUS_CONFIRMED));
 	icalcomponent_add_property(ievent,
-		icalproperty_vanew_created(icaltime_from_timet(time(NULL), TRUE), (void*)0));
+		icalproperty_vanew_created(icaltime_from_timet_with_zone(time(NULL), TRUE, NULL), (void*)0));
 	icalcomponent_add_property(ievent,
-		icalproperty_vanew_lastmodified(icaltime_from_timet(time(NULL), TRUE), (void*)0));
+		icalproperty_vanew_lastmodified(icaltime_from_timet_with_zone(time(NULL), TRUE, NULL), (void*)0));
 	icalcomponent_add_property(ievent,		
                 orgprop);
 
diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
index 4c63245..976d7da 100644
--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
+++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
@@ -477,7 +477,7 @@ static gchar *get_date(VCalMeeting *meet, int start)
 	debug_print("DST change offset to apply to time %d\n", dst_offset);
 	t += dst_offset;
 	debug_print("%s\n", ctime(&t));
-	return g_strdup(icaltime_as_ical_string(icaltime_from_timet(t, FALSE)));
+	return g_strdup(icaltime_as_ical_string(icaltime_from_timet_with_zone(t, FALSE, NULL)));
 }
 
 static gchar *get_location(VCalMeeting *meet)
@@ -893,8 +893,8 @@ static gboolean find_availability(const gchar *dtstart, const gchar *dtend, GSLi
 	found = FALSE;
 	while (!found && offset >= -3600*6) {
 		gboolean ok = TRUE;
-		struct icaltimetype new_start = icaltime_from_timet(icaltime_as_timet(start)+offset, FALSE);
-		struct icaltimetype new_end   = icaltime_from_timet(icaltime_as_timet(end)+offset, FALSE);
+		struct icaltimetype new_start = icaltime_from_timet_with_zone(icaltime_as_timet(start)+offset, FALSE, NULL);
+		struct icaltimetype new_end   = icaltime_from_timet_with_zone(icaltime_as_timet(end)+offset, FALSE, NULL);
 		for (cur = attendees; cur; cur = cur->next) {
 			VCalAttendee *attendee = (VCalAttendee *)cur->data;
 			debug_print("trying %s - %s (offset %d)\n", 
@@ -919,8 +919,8 @@ static gboolean find_availability(const gchar *dtstart, const gchar *dtend, GSLi
 	offset = 1800;
 	while (!found && offset <= 3600*6) {
 		gboolean ok = TRUE;
-		struct icaltimetype new_start = icaltime_from_timet(icaltime_as_timet(start)+offset, FALSE);
-		struct icaltimetype new_end   = icaltime_from_timet(icaltime_as_timet(end)+offset, FALSE);
+		struct icaltimetype new_start = icaltime_from_timet_with_zone(icaltime_as_timet(start)+offset, FALSE, NULL);
+		struct icaltimetype new_end   = icaltime_from_timet_with_zone(icaltime_as_timet(end)+offset, FALSE, NULL);
 		for (cur = attendees; cur; cur = cur->next) {
 			VCalAttendee *attendee = (VCalAttendee *)cur->data;
 			debug_print("trying %s - %s (offset %d)\n", 
@@ -2172,8 +2172,8 @@ gboolean vcal_meeting_export_freebusy(const gchar *path, const gchar *user,
 
 	icalcomponent_add_component(calendar, timezone);
 
-	itt_start = icaltime_from_timet(whole_start, FALSE);
-	itt_end = icaltime_from_timet(whole_end, FALSE);
+	itt_start = icaltime_from_timet_with_zone(whole_start, FALSE, NULL);
+	itt_end = icaltime_from_timet_with_zone(whole_end, FALSE, NULL);
 	itt_start.second = itt_start.minute = itt_start.hour = 0;
 	itt_end.second = 59; itt_end.minute = 59; itt_end.hour = 23;
 
diff --git a/src/plugins/vcalendar/vcalendar.c b/src/plugins/vcalendar/vcalendar.c
index a7064a8..3b7e2f4 100644
--- a/src/plugins/vcalendar/vcalendar.c
+++ b/src/plugins/vcalendar/vcalendar.c
@@ -157,8 +157,8 @@ static void create_meeting_from_message_cb_ui(GtkAction *action, gpointer data)
 			gchar *orgname = NULL;
 			gchar *summary = g_strdup(msginfo->subject ? msginfo->subject:_("no subject"));
 			gchar *description = file_read_stream_to_str(fp);
-			gchar *dtstart = g_strdup(icaltime_as_ical_string(icaltime_from_timet(t, FALSE)));
-			gchar *dtend = g_strdup(icaltime_as_ical_string(icaltime_from_timet(t2, FALSE)));
+			gchar *dtstart = g_strdup(icaltime_as_ical_string(icaltime_from_timet_with_zone(t, FALSE, NULL)));
+			gchar *dtend = g_strdup(icaltime_as_ical_string(icaltime_from_timet_with_zone(t2, FALSE, NULL)));
 			gchar *recur = NULL;
 			gchar *tzid = g_strdup("UTC");
 			gchar *url = NULL;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list