From a17cdb11731e3a557f3274ae566c39bd137d0640 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 11 Dec 1998 13:37:52 +0000 Subject: (main): Arrange to exit unsuccessfully when stime fails. From Andreas Schwab. --- src/date.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/date.c b/src/date.c index bf5b565b4..79eaf4f03 100644 --- a/src/date.c +++ b/src/date.c @@ -344,7 +344,10 @@ argument must be a format string beginning with `+'."), /* Set the system clock to the specified date, then regardless of the success of that operation, format and print that date. */ if (stime (&when) == -1) - error (0, errno, _("cannot set date")); + { + error (0, errno, _("cannot set date")); + status = 1; + } } /* When given a universal time option, set TZ to UTC0 after -- cgit v1.2.3-70-g09d2