From: Roman Moravcik Date: Thu, 14 Oct 2010 10:27:45 +0000 (+0200) Subject: Set hour, minute and second in current date to 0. X-Git-Tag: v0.2-1~12 X-Git-Url: http://git.maemo.org/git/?p=birthday;a=commitdiff_plain;h=d8cf08bad08c9333215a999215278e7fa46ab018;ds=sidebyside Set hour, minute and second in current date to 0. --- 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 */