Date: Thu, 21 Nov 2002 18:25:20 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: questions@FreeBSD.ORG Subject: Re: Setting date with securelevel over 1 Message-ID: <20021121182520.GA77105@happy-idiot-talk.infracaninophi> In-Reply-To: <5A7F3C98-FD7B-11D6-9948-000393012742@macconnect.com> References: <20021121174714.GC76311@happy-idiot-talk.infracaninophi> <5A7F3C98-FD7B-11D6-9948-000393012742@macconnect.com>
index | next in thread | previous in thread | raw e-mail
On Thu, Nov 21, 2002 at 01:02:09PM -0500, Brendan McAlpine wrote:
> date -v +1H
Ah. That doesn't actually *set* the date. It just displays the
date/time one hour ahead.
As the man page says:
-v Adjust (i.e., take the current date and display the result of the
adjustment; not actually set the date) the second, minute, hour,
You need the
date [[[[[cc]yy]mm]dd]HH]MM[.ss]
style to actually set the date. Eg. to set the clock one hour ahead
you could do:
date `date -v+1H '+%Y%m%d%H%M'`
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021121182520.GA77105>
