final touches on dkim test harness
[citadel.git] / webcit / event.c
index 6f989a2379089f1dbacbc46a059794e96d6fddab..ffe0688aba78ab67e9cbbb6e107dd4a8e1d8a67c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Editing calendar events.
  *
- * Copyright (c) 1996-2012 by the citadel.org team
+ * Copyright (c) 2002-2012 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
@@ -13,7 +13,7 @@
  */
 
 #include "webcit.h"
-#include "webserver.h"
+
 #include "calendar.h"
 
 /*
@@ -264,8 +264,6 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                        ((yesbstr("alldayevent")) ? 1 : 0),
                        icaltimezone_get_utc_timezone()
                );
-               t_start.is_utc = 1;
-
        }
        display_icaltimetype_as_webform(&t_start, "dtstart", 0);
 
@@ -361,7 +359,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                strcpy(organizer_string, icalproperty_get_organizer(organizer));
                if (!strncasecmp(organizer_string, "mailto:", 7)) {
                        strcpy(organizer_string, &organizer_string[7]);
-                       striplt(organizer_string);
+                       string_trim(organizer_string);
                        serv_printf("ISME %s", organizer_string);
                        serv_getln(buf, sizeof buf);
                        if (buf[0] == '2') {
@@ -472,7 +470,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
 
                        /* screen name or email address */
                        safestrncpy(attendee_string, ch + 7, sizeof(attendee_string));
-                       striplt(attendee_string);
+                       string_trim(attendee_string);
                        if (i++) wc_printf("\n");
                        escputs(attendee_string);
                        wc_printf(" ");
@@ -854,8 +852,8 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum, char *fr
 
                /* Add NOW() to the calendar object... */
                icalcomponent_set_dtstamp(vevent,
-                                         icaltime_from_timet(
-                                                 time(NULL), 0));
+                                         icaltime_from_timet_with_zone(
+                                                 time(NULL), 0, icaltimezone_get_utc_timezone()));
 
                if (havebstr("summary")) {
                        icalcomponent_add_property(vevent,
@@ -1100,7 +1098,7 @@ void save_individual_event(icalcomponent *supplied_vevent, long msgnum, char *fr
                /* Now iterate! */
                for (i=0; i<num_tokens(form_attendees, '\n'); ++i) {
                        extract_token(buf, form_attendees, i, '\n', sizeof buf);
-                       striplt(buf);
+                       string_trim(buf);
                        if (!IsEmptyStr(buf)) {
                                sprintf(attendee_string, "MAILTO:%s", buf);
                                foundit = 0;
@@ -1127,11 +1125,11 @@ STARTOVER:      for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE
                        ch = icalproperty_get_attendee(attendee);
                        if ((ch != NULL) && !strncasecmp(ch, "MAILTO:", 7)) {
                                safestrncpy(attendee_string, ch + 7, sizeof(attendee_string));
-                               striplt(attendee_string);
+                               string_trim(attendee_string);
                                foundit = 0;
                                for (i=0; i<num_tokens(form_attendees, '\n'); ++i) {
                                        extract_token(buf, form_attendees, i, '\n', sizeof buf);
-                                       striplt(buf);
+                                       string_trim(buf);
                                        if (!strcasecmp(buf, attendee_string)) ++foundit;
                                }
                                if (foundit == 0) {