diff --git a/src/gnome-utils/dialog-book-close.c b/src/gnome-utils/dialog-book-close.c index a2b46aad84..a0e3c2fdd3 100644 --- a/src/gnome-utils/dialog-book-close.c +++ b/src/gnome-utils/dialog-book-close.c @@ -102,7 +102,14 @@ find_or_create_txn(struct CloseAccountsCB* cacb, gnc_commodity* cmdty) txn->txn = xaccMallocTransaction(cacb->cbw->book); xaccTransBeginEdit(txn->txn); xaccTransSetDateEnteredSecs(txn->txn, gnc_time (NULL)); - xaccTransSetDatePostedSecsNormalized(txn->txn, cacb->cbw->close_date); + + /* Watch out: The book-closing txn currently assume that their + posted-date is the end date plus 12 hours, so that the closing txn can + be distinguished from normal txns of the last day. This is the only + case within GnuCash where the PostedDate is a different time-of-day + that what the GDate normally says as a normalized date. */ + xaccTransSetDatePostedSecs(txn->txn, cacb->cbw->close_date); + xaccTransSetDescription(txn->txn, cacb->cbw->desc); xaccTransSetCurrency(txn->txn, cmdty); xaccTransSetIsClosingTxn(txn->txn, TRUE);