aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index c72b061..0ceb975 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -802,9 +802,10 @@ update_appointment_menu_items (gpointer user_data)
DbusmenuMenuitem * item;
ECalComponentVType vtype = e_cal_component_get_vtype (ecalcomp);
+ struct tm due_data = {0};
struct tm *due = NULL;
- if (vtype == E_CAL_COMPONENT_EVENT) due = localtime(&ci->start);
- else if (vtype == E_CAL_COMPONENT_TODO) due = localtime(&ci->end);
+ if (vtype == E_CAL_COMPONENT_EVENT) due = localtime_r(&ci->start, &due_data);
+ else if (vtype == E_CAL_COMPONENT_TODO) due = localtime_r(&ci->end, &due_data);
else continue;
const int dmday = due->tm_mday;