[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shutdown(8) does not reconize ccyymmddhhmm format for time

Shutdown does not reconize if you specify the century, for an exact time.

	# shutdown -r 200312251200
	shutdown: bad time format.

Attached is a patch to allow you to optionally specify the century[1].  The
old format of yymmddhhmm still works as well.  Thanks to Dan Weeks for
assisting me in formatting the patched file to conform to KNF. (Note: there
is whitespace changes in the diff as well, since we have to shift some
blocks over due to additional braces.)

The patch is based on how date(1) handles century.

[1] I don't expect people to schedule shutdowns for 100+ years in the
future, but since people have gotten in the habit of 4 digit years, we might
as well allow that behavior.

After a number of decimal places, nobody gives a damn.

[demime 0.98d removed an attachment of type application/octet-stream which had a name of shutdown.diff]

Visit your host, monkey.org