aboutsummaryrefslogtreecommitdiffstats
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/time.c b/time.c
index 25b843e405..ef8a995da4 100644
--- a/time.c
+++ b/time.c
@@ -3365,12 +3365,12 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp)
*tp = guess_lo +
((tptr->tm_year - tm_lo.tm_year) * 365 +
- ((tptr->tm_year-69)/4) -
- ((tptr->tm_year-1)/100) +
- ((tptr->tm_year+299)/400) -
- ((tm_lo.tm_year-69)/4) +
- ((tm_lo.tm_year-1)/100) -
- ((tm_lo.tm_year+299)/400) +
+ DIV((tptr->tm_year-69), 4) -
+ DIV((tptr->tm_year-1), 100) +
+ DIV((tptr->tm_year+299), 400) -
+ DIV((tm_lo.tm_year-69), 4) +
+ DIV((tm_lo.tm_year-1), 100) -
+ DIV((tm_lo.tm_year+299), 400) +
tptr_tm_yday -
tm_lo.tm_yday) * 86400 +
(tptr->tm_hour - tm_lo.tm_hour) * 3600 +