[Gnucash-changes] r14470 - gnucash/trunk - Restore 1.8 behavior by using the full date/time when sorting on the

David Hampton hampton at cvs.gnucash.org
Sat Jul 8 11:35:37 EDT 2006


Author: hampton
Date: 2006-07-08 11:35:31 -0400 (Sat, 08 Jul 2006)
New Revision: 14470
Trac: http://svn.gnucash.org/trac/changeset/14470

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/engine/Transaction.c
Log:
Restore 1.8 behavior by using the full date/time when sorting on the
posted date.  Fixes #346954.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-07-06 07:45:18 UTC (rev 14469)
+++ gnucash/trunk/ChangeLog	2006-07-08 15:35:31 UTC (rev 14470)
@@ -1,3 +1,8 @@
+2006-07-07  David Hampton  <hampton at cisco.com>
+
+	* src/engine/Transaction.c: Restore 1.8 behavior by using the full
+	date/time when sorting on the posted date.  Fixes #346954.
+
 2006-07-06  David Hampton  <hampton at employees.org>
 
 	* src/gnome-utils/dialog-account.c: When creating accounts from

Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c	2006-07-06 07:45:18 UTC (rev 14469)
+++ gnucash/trunk/src/engine/Transaction.c	2006-07-08 15:35:31 UTC (rev 14470)
@@ -1222,13 +1222,8 @@
   if ( !ta && tb ) return +1;
   if ( !ta && !tb ) return 0;
 
-  /* Only sort on the date, since time info isn't displayed */
-  na = ta->date_posted.tv_sec / SECS_PER_DAY;
-  nb = tb->date_posted.tv_sec / SECS_PER_DAY;
-  if (na < nb)
-    return -1;
-  if (na > nb)
-    return 1;
+  /* if dates differ, return */
+  DATE_CMP(ta,tb,date_posted);
 
   /* otherwise, sort on number string */
   na = atoi(ta->num);



More information about the gnucash-changes mailing list