aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 57a726c..80c0b57 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -770,6 +770,18 @@ update_appointment_menu_items (gpointer user_data)
ECal *ecal = e_cal_new(source, E_CAL_SOURCE_TYPE_EVENT);
e_cal_set_auth_func (ecal, (ECalAuthFunc) auth_func, NULL);
+ icaltimezone* current_zone = icaltimezone_get_builtin_timezone(current_timezone);
+ if (!current_zone) {
+ // current_timezone may be a TZID?
+ current_zone = icaltimezone_get_builtin_timezone_from_tzid(current_timezone);
+ }
+ if (current_zone && !e_cal_set_default_timezone(ecal, current_zone, &gerror)) {
+ g_debug("Failed to set ecal default timezone %s", gerror->message);
+ g_error_free(gerror);
+ gerror = NULL;
+ continue;
+ }
+
if (!e_cal_open(ecal, FALSE, &gerror)) {
g_debug("Failed to get ecal sources %s", gerror->message);
g_error_free(gerror);