Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jan 1998 19:47:16 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Shawn Ramsey <shawn@luke.cpl.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: time?
Message-ID:  <19980105194716.40370@lemis.com>
In-Reply-To: <Pine.BSF.3.95.980105020251.1369A-100000@luke.cpl.net>; from Shawn Ramsey on Mon, Jan 05, 1998 at 02:03:45AM -0800
References:  <Pine.BSF.3.95.980105020251.1369A-100000@luke.cpl.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 05, 1998 at 02:03:45AM -0800, Shawn Ramsey wrote:
> Pardon the amateur question, but how do you set the time? 

With date(1)

> If the command is date if you could please give an example...

Sure.  It's Real Simple :-)

To set just the time, say to 3:14 pm, enter

 # date 1514

Note the # prompt (you must be root), and the 24 hour clock.

If you want to set the date as well, say to January 7, you *must*
specify the time as well:

 # date 01071514

Then, you can set the year too:

 # date 9701071514

Sorry, you can't (currently) specify all four digits of the year.
That's not that serious: for example, to set the year to 2002, you can
enter:

 # date 0201071514

OK?

Greg






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980105194716.40370>