aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-03 17:12:12 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-03 17:12:12 +0800
commita753b72a982b384b91a78ef91aa6088ca11c9824 (patch)
tree684fe7ee29fceda053e5f9801c5b8692ff256a60 /calendar/gui/dialogs
parent5181884e249cc4c808114e6b3fd8b958532084f0 (diff)
downloadgsoc2013-evolution-a753b72a982b384b91a78ef91aa6088ca11c9824.tar.gz
gsoc2013-evolution-a753b72a982b384b91a78ef91aa6088ca11c9824.tar.zst
gsoc2013-evolution-a753b72a982b384b91a78ef91aa6088ca11c9824.zip
fix warning, and added some debug messages.
2001-07-03 Damon Chaplin <damon@ximian.com> * 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
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c6
1 files changed, 5 insertions, 1 deletions
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 (),