From d8cf08bad08c9333215a999215278e7fa46ab018 Mon Sep 17 00:00:00 2001 From: Roman Moravcik Date: Thu, 14 Oct 2010 12:27:45 +0200 Subject: [PATCH] Set hour, minute and second in current date to 0. --- src/birthday.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/birthday.c b/src/birthday.c index a5ba7ae..00c200c 100644 --- a/src/birthday.c +++ b/src/birthday.c @@ -354,6 +354,7 @@ create_bday_liststore (BirthdayData *priv, GList *contacts) gchar *text_color = NULL; guint n_contacts = 0; time_t current_date; + struct tm *current_date_tm; g_return_val_if_fail (priv, NULL); @@ -362,6 +363,13 @@ create_bday_liststore (BirthdayData *priv, GList *contacts) current_date = time (NULL); + /* set hour, minute, second to 0 */ + current_date_tm = gmtime (¤t_date); + current_date_tm->tm_sec = 0; + current_date_tm->tm_min = 0; + current_date_tm->tm_hour = 0; + current_date = mktime (current_date_tm); + store = gtk_list_store_new(NUM_COLS, GDK_TYPE_PIXBUF, /* COLUMN_AVATAR */ G_TYPE_STRING, /* COLUMN_DISPLAY */ -- 1.7.9.5