That is, use localtime_r(3) instead of gmtime_r(3).
Closes: <https://github.com/shadow-maint/shadow/issues/1057>
Reported-by: Gus Kenion <https://github.com/kenion>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
return;
}
- if (gmtime_r(&date, &tm) == NULL) {
+ if (localtime_r(&date, &tm) == NULL) {
strtcpy(buf, "future", size);
return;
}
return;
}
- if (gmtime_r(&date, &tm) == NULL) {
+ if (localtime_r(&date, &tm) == NULL) {
(void) printf ("time_t: %lu\n", (unsigned long)date);
return;
}