projects
/
birthday
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2423010
)
Set hour, minute and second in current date to 0.
author
Roman Moravcik
<roman.moravcik@gmail.com>
Thu, 14 Oct 2010 10:27:45 +0000
(12:27 +0200)
committer
Roman Moravcik
<roman.moravcik@gmail.com>
Thu, 14 Oct 2010 10:27:45 +0000
(12:27 +0200)
src/birthday.c
patch
|
blob
|
history
diff --git
a/src/birthday.c
b/src/birthday.c
index
a5ba7ae
..
00c200c
100644
(file)
--- 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;
gchar *text_color = NULL;
guint n_contacts = 0;
time_t current_date;
+ struct tm *current_date_tm;
g_return_val_if_fail (priv, NULL);
g_return_val_if_fail (priv, NULL);
@@
-362,6
+363,13
@@
create_bday_liststore (BirthdayData *priv, GList *contacts)
current_date = time (NULL);
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 */
store = gtk_list_store_new(NUM_COLS,
GDK_TYPE_PIXBUF, /* COLUMN_AVATAR */
G_TYPE_STRING, /* COLUMN_DISPLAY */