From 6e19286166312c0cdf801da63063291a6f80879e Mon Sep 17 00:00:00 2001 From: Elio Maldonado Date: Thu, 29 Jan 2009 22:15:33 +0000 Subject: [PATCH] Fix certwatch time calculations for expiring certificates (#473860) --- certwatch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/certwatch.c b/certwatch.c index 34b6325..477e85f 100644 --- a/certwatch.c +++ b/certwatch.c @@ -152,6 +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) { + /* Dividing before substracting to support the desired granularity */ PRInt64 secs = (aT/PR_USEC_PER_SEC - bT/PR_USEC_PER_SEC); return secs / 86400L; }