From a06e5be617eb58a733be52186a7f8c9538c3ba9b Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 3 Feb 2004 03:09:54 +0000 Subject: [PATCH] * THIS IS 5.04 --- webcit/ChangeLog | 4 ++++ webcit/calendar.c | 6 ------ webcit/calendar_tools.c | 12 +++++++---- webcit/calendar_view.c | 46 ++++++++++++++++++++++++++++++++++------- webcit/webcit.h | 4 ++-- 5 files changed, 52 insertions(+), 20 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 1aaa3d308..7a0ff9cc6 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 504.1 2004/02/03 03:09:51 ajc +* THIS IS 5.04 + Revision 503.0 2004/01/28 04:31:31 ajc * THIS IS 5.03 @@ -1633,3 +1636,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/calendar.c b/webcit/calendar.c index 9185c3edb..6992d3de7 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -71,8 +71,6 @@ void display_task(long msgnum) { * Process a calendar object * ...at this point it's already been deserialized by cal_process_attachment() * - * ok for complete vcalendar objects - * */ void cal_process_object(icalcomponent *cal, int recursion_level, @@ -327,7 +325,6 @@ void cal_process_object(icalcomponent *cal, /* * Deserialize a calendar object in a message so it can be processed. * (This is the main entry point for these things) - * ok for complete vcalendar objects */ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { icalcomponent *cal; @@ -505,7 +502,6 @@ void display_individual_task(icalcomponent *vtodo, long msgnum) { /* * Display a task by itself (for editing) * - * ok for complete vcalendar objects */ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) { icalcomponent *vtodo; @@ -610,7 +606,6 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum) { /* * Save an edited task * - * ok */ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum) { char buf[SIZ]; @@ -729,7 +724,6 @@ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum) { * the relevant part, deserialize it into a libical component, filter it for * the requested object type, and feed it to the specified handler. * - * ok */ void display_using_handler(long msgnum, char *mimetype, diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c index e276cf393..bea5fc109 100644 --- a/webcit/calendar_tools.c +++ b/webcit/calendar_tools.c @@ -65,23 +65,27 @@ char *hourname[] = { void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) { int i; - time_t now; struct tm tm_now; int this_year; - time_t tt; struct tm tm; - const int span = 10; + int all_day_event = 0; now = time(NULL); memcpy(&tm_now, localtime(&now), sizeof(struct tm)); this_year = tm_now.tm_year + 1900; if (t == NULL) return; + if (t->is_date) all_day_event = 1; tt = icaltime_as_timet(*t); - memcpy(&tm, localtime(&tt), sizeof(struct tm)); + if (all_day_event) { + memcpy(&tm, gmtime(&tt), sizeof(struct tm)); + } + else { + memcpy(&tm, localtime(&tt), sizeof(struct tm)); + } wprintf("Month: "); wprintf("