Bug 5395 - leave(1) wont accept 0145 as an argument
Summary: leave(1) wont accept 0145 as an argument
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.5-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-12-30 00:00 UTC by Andrew Stevenson
Modified: 1998-01-06 17:30 UTC (History)
0 users

See Also:


Attachments
file.diff (1.36 KB, patch)
1997-12-30 00:00 UTC, Andrew Stevenson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Stevenson 1997-12-30 00:00:01 UTC
I may have just misunderstood the man page but...

The man page for leave(1) says you can specify all times in either 24
or 12 hour time and they are assumed to be in the next 12 hours.

However...

leave will not accept 0145 (ie 1.45 am) as an argument (time is
currently 22xx). It runs into problems at leave.c:108
(As 01 is < t->tm_hour). This argument should be accepted however
as it is within 12 hours.

It also appears as though I should be able to specify 1345 and still
mean 0145 (as the man page states all times are converted to 12 hour
time and then assumed to be in the next 12 hours).

Fix: I think this should work...it allowed me to set the alarm at 0145 anyway :-)
How-To-Repeat: 
set time to after 1345

/usr/bin/leave 0145
Comment 1 helbig freebsd_committer freebsd_triage 1998-01-06 17:27:39 UTC
State Changed
From-To: open->closed

Suggested fix (with style(9) changes) applied, thanks Andrew.