mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
ca9783939a
commit
5610fbb4b8
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user