diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index b82a7e72c9a2..1543568bd7ce 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -473,7 +473,8 @@ ac(fp) if (!FirstTime) FirstTime = usr.ut_time; if (Flags & AC_D) { - ltm = localtime(&usr.ut_time); + time_t t = int_to_time(usr.ut_time); + ltm = localtime(&t); if (day >= 0 && day != ltm->tm_yday) { day = ltm->tm_yday; /* @@ -524,7 +525,8 @@ ac(fp) (void)strcpy(usr.ut_line, "~"); if (Flags & AC_D) { - ltm = localtime(&usr.ut_time); + time_t t = int_to_time(usr.ut_time); + ltm = localtime(&t); if (day >= 0 && day != ltm->tm_yday) { /* * print yesterday's total