2 * Copyright (c) 1987-2018 by the citadel.org team
4 * This program is open source software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License version 3.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
17 #include <sys/types.h>
23 #include <libical/ical.h>
24 #include <libcitadel.h>
27 #include "citserver.h"
28 #include "sysdep_decls.h"
31 #include "default_timezone.h"
32 #include "ctdl_module.h"
36 * Figure out which time zone needs to be used for timestamps that are
37 * not UTC and do not have a time zone specified.
39 icaltimezone *get_default_icaltimezone(void) {
41 icaltimezone *zone = NULL;
42 char *default_zone_name = CtdlGetConfigStr("c_default_cal_zone");
45 zone = icaltimezone_get_builtin_timezone(default_zone_name);
48 syslog(LOG_ERR, "ical: Unable to load '%s' time zone. Defaulting to UTC.", default_zone_name);
49 zone = icaltimezone_get_utc_timezone();
52 syslog(LOG_ERR, "ical: unable to load UTC time zone!");