diff --git a/lib/time/day_to_str.h b/lib/time/day_to_str.h index 374240f5..f908a752 100644 --- a/lib/time/day_to_str.h +++ b/lib/time/day_to_str.h @@ -38,7 +38,7 @@ day_to_str(size_t size, char buf[size], long day) return; } - if (gmtime_r(&date, &tm) == NULL) { + if (localtime_r(&date, &tm) == NULL) { strtcpy(buf, "future", size); return; } diff --git a/src/chage.c b/src/chage.c index 1e296fca..5146fde0 100644 --- a/src/chage.c +++ b/src/chage.c @@ -242,7 +242,7 @@ print_day_as_date(long day) return; } - if (gmtime_r(&date, &tm) == NULL) { + if (localtime_r(&date, &tm) == NULL) { (void) printf ("time_t: %lu\n", (unsigned long)date); return; }