[Gnucash-changes] r13667 - gnucash/trunk - Let glib subtract days
from a GDate, because G_DATE_BAD_DAY (0) is a bad day.
Andreas Koehler
andi5 at cvs.gnucash.org
Sat Mar 18 11:11:42 EST 2006
Author: andi5
Date: 2006-03-18 11:11:40 -0500 (Sat, 18 Mar 2006)
New Revision: 13667
Trac: http://svn.gnucash.org/trac/changeset/13667
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome/dialog-sx-from-trans.c
Log:
Let glib subtract days from a GDate, because G_DATE_BAD_DAY (0) is a bad day.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-03-18 15:05:33 UTC (rev 13666)
+++ gnucash/trunk/ChangeLog 2006-03-18 16:11:40 UTC (rev 13667)
@@ -1,5 +1,8 @@
2006-03-18 Andreas Köhler <andi5.py at gmx.net>
+ * src/gnome/dialog-sx-from-trans.c: Let glib subtract days from a
+ GDate, because G_DATE_BAD_DAY (0) is a bad day.
+
* src/gnome-utils/gnc-embedded-window.c:
* src/gnome/dialog-sxsincelast.c:
* src/gnome/dialog-scheduledxaction.c: Correct SX editor and Since
Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2006-03-18 15:05:33 UTC (rev 13666)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c 2006-03-18 16:11:40 UTC (rev 13667)
@@ -720,13 +720,15 @@
tmp_tt = gnc_date_edit_get_date( sxfti->startDateGDE );
tmpTm = g_new0( struct tm, 1 );
*tmpTm = *localtime( &tmp_tt );
- /* go one day before what's in the box so we can get the correct start
- * date. */
- g_date_set_day( &date, tmpTm->tm_mday-1 );
+ g_date_set_day( &date, tmpTm->tm_mday );
g_date_set_month( &date, tmpTm->tm_mon+1 );
g_date_set_year( &date, tmpTm->tm_year+1900 );
g_free( tmpTm );
+ /* go one day before what's in the box so we can get the correct start
+ * date. */
+ g_date_subtract_days(&date, 1);
+
sxftd_update_fs( sxfti, &date, fs );
xaccFreqSpecGetNextInstance( fs, &date, &date );
startDate = date;
More information about the gnucash-changes
mailing list