from_iso8601(): set time to 00:00:00 if not specified
authorMikael Berthe <mikael@lilotux.net>
Thu, 29 Sep 2005 22:03:22 +0200
changeset 463 339e85418b49
parent 462 d580e87c11ed
child 464 e4840b288be0
from_iso8601(): set time to 00:00:00 if not specified
mcabber/src/utils.c
--- a/mcabber/src/utils.c	Thu Sep 29 21:28:39 2005 +0200
+++ b/mcabber/src/utils.c	Thu Sep 29 22:03:22 2005 +0200
@@ -178,6 +178,9 @@
   time(&retval);
   localtime_r(&retval, &t);
 
+  /* Reset time to midnight (00:00:00) */
+  t.tm_hour = t.tm_min = t.tm_sec = 0;
+
   snprintf(buf, sizeof(buf), "%s", timestamp);
   c = buf;