Merge from stable tree. Strip time portion off of default transaction

date.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3240 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-12-05 09:17:59 +00:00
parent ca9783939a
commit 5610fbb4b8

View File

@ -248,6 +248,23 @@ static void xaccSRSetTransVisible (SplitRegister *reg,
/** implementations *******************************************************/ /** implementations *******************************************************/
static time_t
get_today_midnight (void)
{
time_t present;
struct tm tm;
present = time (NULL);
tm = *localtime (&present);
tm.tm_sec = 0;
tm.tm_min = 0;
tm.tm_hour = 0;
return mktime (&tm);
}
/* The routines below create, access, and destroy the SRInfo structure /* The routines below create, access, and destroy the SRInfo structure
* used by SplitLedger routines to store data for a particular register. * used by SplitLedger routines to store data for a particular register.
* This is the only code that should access the user_data member of a * This is the only code that should access the user_data member of a
@ -265,7 +282,7 @@ xaccSRInitRegisterData(SplitRegister *reg)
info->blank_split_guid = *xaccGUIDNULL (); info->blank_split_guid = *xaccGUIDNULL ();
info->pending_trans_guid = *xaccGUIDNULL (); info->pending_trans_guid = *xaccGUIDNULL ();
info->last_date_entered = time(NULL); info->last_date_entered = get_today_midnight ();
info->first_pass = TRUE; info->first_pass = TRUE;
reg->user_data = info; reg->user_data = info;