NetBSD Problem Report #8944
Received: (qmail 26961 invoked from network); 3 Dec 1999 22:35:43 -0000
Message-Id: <199912032235.RAA25485@millennium.stealth.net>
Date: Fri, 3 Dec 1999 17:35:42 -0500 (EST)
From: kalt@stealth.net
To: gnats-bugs@gnats.netbsd.org
Subject: leave(1) doesn't handle hhmm in 24hr format well
X-Send-Pr-Version: 3.95
>Number: 8944
>Category: misc
>Synopsis: leave(1) doesn't handle hhmm in 24hr format well
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: fair
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 03 14:36:00 +0000 1999
>Closed-Date: Mon Jan 21 04:09:02 +0000 2002
>Last-Modified: Mon Jan 21 04:09:02 +0000 2002
>Originator: Christophe Kalt
>Release: 1.4 userland
>Organization:
>Environment:
System: NetBSD azurite 1.4.1 NetBSD 1.4.1 (TP560) #0: Wed Oct 13 15:58:14 EDT 1999 kalt@azurite:/fs0/CVS/syssrc/sys/arch/i386/compile/TP560 i386
>Description:
from the man page:
hhmm The time of day is in the form hhmm where hh is a time in hours (on
a 12 or 24 hour clock), and mm are minutes. All times are convert-
ed to a 12 hour clock, and assumed to be in the next 12 hours.
$ date
Fri Dec 3 17:18:56 EST 1999
$ leave 1800
Alarm set for Sat Dec 4 06:00. (pid 5389)
>How-To-Repeat:
my guess is that it's only a problem in the afternoon.
>Fix:
i didn't test much, so beware. :)
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/leave/leave.c,v
retrieving revision 1.8
diff -u -r1.8 leave.c
--- leave.c 1998/12/19 17:44:22 1.8
+++ leave.c 1999/12/03 22:31:47
@@ -118,6 +118,8 @@
usage();
if (t->tm_hour >= 12)
t->tm_hour -= 12;
+ if (hours >= 12)
+ hours -= 12;
if (t->tm_hour > hours ||
(t->tm_hour == hours && minutes <= t->tm_min))
hours += 12;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: misc-bug-people->fair
Responsible-Changed-By: fair
Responsible-Changed-When: Sat Jan 19 18:17:25 PST 2002
Responsible-Changed-Why:
I've already fixed this bug and updated the man page to be more clear
about the limitations of leave(1), but the NetBSD CVS server is down,
so I'm "taking" this PR to remind me to commit the changes when it comes
back up again.
State-Changed-From-To: open->feedback
State-Changed-By: fair
State-Changed-When: Sat Jan 19 19:56:01 PST 2002
State-Changed-Why:
The patch has been committed, and the man page revised; also a pullup
to the NetBSD 1.5 branch has been requested. Is this PR resolved?
From: Christophe Kalt <kalt@taranis.org>
To: fair@netbsd.org
Cc:
Subject: Re: misc/8944
Date: Sun, 20 Jan 2002 21:22:53 -0500
On Jan 20, fair@netbsd.org wrote:
| to the NetBSD 1.5 branch has been requested. Is this PR resolved?
sounds like it, thanks!
State-Changed-From-To: feedback->closed
State-Changed-By: fair
State-Changed-When: Sun Jan 20 20:08:49 PST 2002
State-Changed-Why:
Problem Resolved.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.