From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 02:58:38 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DA6B16A4B3 for ; Tue, 23 Sep 2003 02:58:38 -0700 (PDT) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D01143FE1 for ; Tue, 23 Sep 2003 02:58:37 -0700 (PDT) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 7AAA21364C; Tue, 23 Sep 2003 21:58:35 +1200 (NZST) Date: Tue, 23 Sep 2003 21:58:35 +1200 From: Jonathan Chen To: Jez Hancock Message-ID: <20030923095835.GC62839@grimoire.chen.org.nz> References: <20030923050750.GA38213@users.munk.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030923050750.GA38213@users.munk.nu> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Unix timestamp X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 09:58:38 -0000 On Tue, Sep 23, 2003 at 06:07:50AM +0100, Jez Hancock wrote: > Is there a native FreeBSD shell util for returning the time in seconds > since the Unix epoch? date(1) doesn't seem to do this, only the > converse with the -r switch: > > [6:05:51] munk@users /home/munk# date -r "1064293551" > Tue Sep 23 06:05:51 BST 2003 > > Just curious - I ended up making a simple C app that does the job. This works for me: ~,9:57pm> date '+%s' 1064311041 Cheers. -- Jonathan Chen ---------------------------------------------------------------------- When you don't know what you are doing, do it neatly.