]> code.citadel.org Git - citadel.git/blobdiff - citadel/ical_dezonify.c
Cleaning the API a bit more.
[citadel.git] / citadel / ical_dezonify.c
index 463af2f0cc2985280b37fbcb9173ab26e49ed98d..dc9c245afae949ccbcd84b2771da8e94e644f8ae 100644 (file)
@@ -16,7 +16,8 @@
 #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"
 #include "citserver.h"
@@ -25,6 +26,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
@@ -87,10 +90,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");
+                                       }
+*/
+                               }
                        }
                }