From a753b72a982b384b91a78ef91aa6088ca11c9824 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 3 Jul 2001 09:12:12 +0000 Subject: fix warning, and added some debug messages. 2001-07-03 Damon Chaplin * gui/e-day-view.c (query_obj_updated_cb): fix warning, and added some debug messages. * gui/dialogs/comp-editor-util.c (write_label_piece): * gui/e-day-view-top-item.c (e_day_view_top_item_draw): call mktime() to set the weekday, though this is a temporary fix. svn path=/trunk/; revision=10737 --- calendar/gui/dialogs/comp-editor-util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'calendar/gui/dialogs/comp-editor-util.c') diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index e3cf454e84..dcad6a44cf 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -93,7 +93,7 @@ static void write_label_piece (struct icaltimetype *tt, char *buffer, int size, char *stext, char *etext) { - struct tm tmp_tm; + struct tm tmp_tm = { 0 }; int len; /* FIXME: May want to convert the time to an appropriate zone. */ @@ -109,6 +109,10 @@ write_label_piece (struct icaltimetype *tt, char *buffer, int size, tmp_tm.tm_sec = tt->second; tmp_tm.tm_isdst = -1; + /* Call mktime() to set the weekday. FIXME: Don't do this. mktime() + could in theory adjust the time if it thought it was invalid. */ + mktime (&tmp_tm); + len = strlen (buffer); e_time_format_date_and_time (&tmp_tm, calendar_config_get_24_hour_format (), -- cgit v1.2.3