X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fical_dezonify.c;h=70a28600d3e8e33f7061a7e6ed3be032ebd416a8;hb=df5a2fc29b002c29981d98e483c51658e3b6ad45;hp=4a7de0715962249e0a5d95c10e6a8d47c2a2dfc1;hpb=435faa62a4b8f943a48cfe05593b379399e4a073;p=citadel.git diff --git a/citadel/ical_dezonify.c b/citadel/ical_dezonify.c index 4a7de0715..70a28600d 100644 --- a/citadel/ical_dezonify.c +++ b/citadel/ical_dezonify.c @@ -32,16 +32,24 @@ * 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 *get_default_icaltimezone(void) { + icaltimezone *zone = NULL; + char *default_zone_name = config.c_default_cal_zone; + //char *default_zone_name = "America/New_York"; - if (!zone) { - zone = icaltimezone_get_builtin_timezone(config.c_default_cal_zone); - } if (!zone) { + zone = icaltimezone_get_builtin_timezone(default_zone_name); + } + if (!zone) { + lprintf(CTDL_ALERT, + "Unable to load '%s' time zone. Defaulting to UTC.\n", + default_zone_name); zone = icaltimezone_get_utc_timezone(); } + if (!zone) { + lprintf(1, "Unable to load UTC time zone!\n"); + } return zone; }