Merge Chris Carson's 'refactor-Scrub-c' into maint.

This commit is contained in:
John Ralls
2019-01-04 15:49:42 -08:00

View File

@@ -1431,14 +1431,16 @@ void
xaccTransScrubPostedDate (Transaction *trans)
{
time64 orig = xaccTransGetDate(trans);
if(orig == INT64_MAX)
{
GDate date = xaccTransGetDatePostedGDate(trans);
time64 time = gdate_to_time64(date);
/* xaccTransGetDatePostedGDate will return a valid time */
if (orig == INT64_MAX && orig != time)
if(time != INT64_MAX)
{
/* xaccTransSetDatePostedSecs handles committing the change. */
// xaccTransSetDatePostedSecs handles committing the change.
xaccTransSetDatePostedSecs(trans, time);
}
}
}
/* ==================== END OF FILE ==================== */