2 // Copyright (c) 1987-2022 by the citadel.org team
4 // This program is open source software. Use, duplication, or disclosure
5 // is subject to the terms of the GNU General Public License, version 3.
10 #include <sys/types.h>
16 #include <libical/ical.h>
17 #include <libcitadel.h>
18 #include "citadel_defs.h"
20 #include "citserver.h"
21 #include "sysdep_decls.h"
24 #include "default_timezone.h"
25 #include "ctdl_module.h"
28 // Figure out which time zone needs to be used for timestamps that are
29 // not UTC and do not have a time zone specified.
30 icaltimezone *get_default_icaltimezone(void) {
32 icaltimezone *zone = NULL;
33 char *default_zone_name = CtdlGetConfigStr("c_default_cal_zone");
36 zone = icaltimezone_get_builtin_timezone(default_zone_name);
39 syslog(LOG_ERR, "ical: Unable to load '%s' time zone. Defaulting to UTC.", default_zone_name);
40 zone = icaltimezone_get_utc_timezone();
43 syslog(LOG_ERR, "ical: unable to load UTC time zone!");