From owner-freebsd-questions Mon Jan 5 06:00:52 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA04608 for questions-outgoing; Mon, 5 Jan 1998 06:00:52 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from BIGFUN.vwcom.com (BIGFUN.vwcom.com [151.197.101.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA04603 for ; Mon, 5 Jan 1998 06:00:43 -0800 (PST) (envelope-from bmc@WillsCreek.COM) Received: from WillsCreek.COM (gw.willscreek.com [151.197.101.46]) by BIGFUN.vwcom.com (8.8.6/8.8.6) with ESMTP id IAA04278; Mon, 5 Jan 1998 08:55:23 -0500 (EST) Received: from current.willscreek.com (current.willscreek.com [172.16.87.1]) by WillsCreek.COM (8.8.8/8.8.5) with ESMTP id JAA09826; Mon, 5 Jan 1998 09:00:21 -0500 (EST) Received: (from bmc@localhost) by current.willscreek.com (8.8.8/8.8.5) id JAA12801; Mon, 5 Jan 1998 09:00:19 -0500 (EST) Date: Mon, 5 Jan 1998 09:00:19 -0500 (EST) Message-Id: <199801051400.JAA12801@current.willscreek.com> From: Brian Clapper MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Greg Lehey Cc: Shawn Ramsey , questions@freebsd.org Subject: Re: time? In-Reply-To: <19980105194716.40370@lemis.com> References: <19980105194716.40370@lemis.com> X-Mailer: VM 6.23 under Emacs 19.34.1 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On 5 January, 1998, at 19:47 (+1030) Greg Lehey wrote: > 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 Actually, there *is* a way to specify all four digits of the year, but it's counterintuitive (and not found on all UNIX date(1) commands). From the FreeBSD date(1) man page: -f Use fmt as the format string to parse the date provided rather than using the default [[[[yy]mm]dd]HH]MM[.ss] format. Parsing is done using strptime(3). The command # date -f '%Y/%m/%d %H:%M:%S' '1998/01/05 10:00:03' will set the date to 05 Jan, 1998 10:00:03 AM. ----- Brian Clapper, bmc@WillsCreek.COM, http://WWW.WillsCreek.COM/ When you make your mark in the world, watch out for guys with erasers. -- The Wall Street Journal