#include "webcit.h"
#include "webserver.h"
-
/*
* Figure out which time zone needs to be used for timestamps that are
* not UTC and do not have a time zone specified.
icaltimezone *get_default_icaltimezone(void) {
icaltimezone *zone = NULL;
- char *default_zone_name = serv_info.serv_default_cal_zone;
+ const char *default_zone_name = ChrPtr(serv_info.serv_default_cal_zone);
if (!zone) {
zone = icaltimezone_get_builtin_timezone(default_zone_name);
#endif
}
else {
+ /* try attached first */
t = icalcomponent_get_timezone(cal, tzid);
#ifdef DBG_ICAL
lprintf(9, " * ...and I %s have tzdata for that zone.\n",
(t ? "DO" : "DO NOT")
);
#endif
+ /* then try built-in timezones */
+ if (!t) {
+ t = icaltimezone_get_builtin_timezone(tzid);
+#ifdef DBG_ICAL
+ if (t) {
+ lprintf(9, " * Using system tzdata!\n");
+ }
+#endif
+ }
}
}