Fix gnc_difftime so it is the same as difftime, which it replaces.

It was computing the negative of the expected value.  The most obvious
effect of this was that the reconcile interval became negative when you
reconciled an account so each reconciliation was earlier than the previous.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22688 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Mike Alexander 2013-01-01 00:10:07 +00:00
parent 365237aec4
commit 18bb5e843d
2 changed files with 3 additions and 3 deletions

View File

@ -462,7 +462,7 @@ gnc_time_utc (time64 *tbuf)
gdouble
gnc_difftime (const time64 secs1, const time64 secs2)
{
return (double)secs2 - (double)secs1;
return (double)secs1 - (double)secs2;
}
/****************************************************************************/

View File

@ -229,8 +229,8 @@ time64 gnc_time_utc (time64 *tbuf);
* 00:00:01 UTC 01 January 1970 (negative values are seconds before that moment)
* \param secs2: The second time value, in Seconds since
* 00:00:01 UTC 01 January 1970 (negative values are seconds before that moment)
* \return The difference in seconds between secs1 and secs2. If secs1 is
* later than secs2 the value will be negative.
* \return The difference in seconds between secs1 and secs2. If secs2 is
* later than secs1 the value will be negative.
*/
gdouble gnc_difftime (const time64 secs1, const time64 secs2);