Hi, > ok gerhard@
Thanks for reporting, for the initial patch, and for checking the final one. This now committed. Yours, Ingo >> Index: date.c >> =================================================================== >> RCS file: /cvs/src/bin/date/date.c,v >> retrieving revision 1.56 >> diff -u -p -r1.56 date.c >> --- date.c 8 Aug 2019 02:17:51 -0000 1.56 >> +++ date.c 6 Aug 2021 17:48:01 -0000 >> @@ -219,7 +219,11 @@ setthetime(char *p, const char *pformat) >> } >> >> /* convert broken-down time to UTC clock time */ >> - if ((tval = mktime(lt)) == -1) >> + if (pformat != NULL && strstr(pformat, "%s") != NULL) >> + tval = timegm(lt); >> + else >> + tval = mktime(lt); >> + if (tval == -1) >> errx(1, "specified date is outside allowed range"); >> >> if (jflag)