Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/at PR bin/53986 from Christian Weisgerber
details: https://anonhg.NetBSD.org/src/rev/b6d89a31d906
branches: trunk
changeset: 448966:b6d89a31d906
user: kre <kre%NetBSD.org@localhost>
date: Sat Feb 16 17:56:57 2019 +0000
description:
PR bin/53986 from Christian Weisgerber
Skip forward to tomorrow to run a command earlier in the current
hour than now (as well as during an earlier hour of the day).
diffstat:
usr.bin/at/parsetime.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 674bdd6db80f -r b6d89a31d906 usr.bin/at/parsetime.c
--- a/usr.bin/at/parsetime.c Sat Feb 16 16:20:50 2019 +0000
+++ b/usr.bin/at/parsetime.c Sat Feb 16 17:56:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parsetime.c,v 1.19 2009/01/18 01:02:31 lukem Exp $ */
+/* $NetBSD: parsetime.c,v 1.20 2019/02/16 17:56:57 kre Exp $ */
/*
* parsetime.c - parse time for at(1)
@@ -160,7 +160,7 @@
#if 0
static char rcsid[] = "$OpenBSD: parsetime.c,v 1.4 1997/03/01 23:40:10 millert Exp $";
#else
-__RCSID("$NetBSD: parsetime.c,v 1.19 2009/01/18 01:02:31 lukem Exp $");
+__RCSID("$NetBSD: parsetime.c,v 1.20 2019/02/16 17:56:57 kre Exp $");
#endif
#endif
@@ -405,7 +405,8 @@
* if we've gone past that time - but if we're specifying a time plus
* a relative offset, it's okay to bump things
*/
- if ((sc_tokid == TOKEOF || sc_tokid == PLUS) && tm->tm_hour > hour) {
+ if ((sc_tokid == TOKEOF || sc_tokid == PLUS) && (tm->tm_hour > hour ||
+ (tm->tm_hour == hour && tm->tm_min > minute))) {
tm->tm_mday++;
tm->tm_wday++;
}
Home |
Main Index |
Thread Index |
Old Index