Prevent unwanted truncation in diff_time_days that caused a one day error

in time until exipry calculations (#473860)
This commit is contained in:
Elio Maldonado 2009-01-22 23:18:37 +00:00
parent dcff748df9
commit bff76aa41a
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ char *pr_ctime(PRTime time, char *buf, int size)
/* Computes the day difference among two PRTime's */
static int diff_time_days(PRTime aT, PRTime bT)
{
PRInt64 secs = (aT - bT) / PR_USEC_PER_SEC;
PRInt64 secs = (aT/PR_USEC_PER_SEC - bT/PR_USEC_PER_SEC);
return secs / 86400L;
}