Began removing $Id$ tags. This will be an ongoing process.
[citadel.git] / citadel / ical_dezonify.c
index 662840c41105b81548cf409a139da7a9f5227861..8ec12f7e9268dd97ce5956ba5968b3b3db808d70 100644 (file)
@@ -1,10 +1,7 @@
 /* 
- * $Id$ 
- *
  * Function to go through an ical component set and convert all non-UTC
  * date/time properties to UTC.  It also strips out any VTIMEZONE
  * subcomponents afterwards, because they're irrelevant.
- *
  */
 
 
@@ -16,7 +13,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <strings.h>
-#include <ical.h>
+#include <libical/ical.h>
 #include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
@@ -26,6 +23,8 @@
 #include "config.h"
 #include "ical_dezonify.h"
 
+#include "ctdl_module.h"
+
 
 /*
  * Figure out which time zone needs to be used for timestamps that are
@@ -88,10 +87,22 @@ void ical_dezonify_backend(icalcomponent *cal,
                                /* CtdlLogPrintf(9, "                * ...and we handle that internally.\n"); */
                        }
                        else {
+                               /* try attached first */
                                t = icalcomponent_get_timezone(cal, tzid);
-                               /* CtdlLogPrintf(9, "                * ...and I %s have tzdata for that zone.\n",
+/*
+                               lprintf(9, "                * ...and I %s have tzdata for that zone.\n",
                                        (t ? "DO" : "DO NOT")
-                               ); */
+                               );
+*/
+                               /* then try built-in timezones */
+                               if (!t) {
+                                       t = icaltimezone_get_builtin_timezone(tzid);
+/*
+                                       if (t) {
+                                               lprintf(9, "                * Using system tzdata!\n");
+                                       }
+*/
+                               }
                        }
                }