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.
6 // The program is distributed without any warranty, expressed or implied.
11 #include <sys/types.h>
17 #include <libical/ical.h>
18 #include <libcitadel.h>
21 #include "citserver.h"
22 #include "sysdep_decls.h"
25 #include "default_timezone.h"
26 #include "ctdl_module.h"
29 // Figure out which time zone needs to be used for timestamps that are
30 // not UTC and do not have a time zone specified.
31 icaltimezone *get_default_icaltimezone(void) {
33 icaltimezone *zone = NULL;
34 char *default_zone_name = CtdlGetConfigStr("c_default_cal_zone");
37 zone = icaltimezone_get_builtin_timezone(default_zone_name);
40 syslog(LOG_ERR, "ical: Unable to load '%s' time zone. Defaulting to UTC.", default_zone_name);
41 zone = icaltimezone_get_utc_timezone();
44 syslog(LOG_ERR, "ical: unable to load UTC time zone!");