Date: Tue, 23 Sep 2003 21:58:35 +1200 From: Jonathan Chen <jonc@chen.org.nz> To: Jez Hancock <jez.hancock@munk.nu> Cc: freebsd-questions@freebsd.org Subject: Re: Unix timestamp Message-ID: <20030923095835.GC62839@grimoire.chen.org.nz> In-Reply-To: <20030923050750.GA38213@users.munk.nu> References: <20030923050750.GA38213@users.munk.nu>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jonc@chen.org.nz>
----------------------------------------------------------------------
                 When you don't know what you are doing, do it neatly.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030923095835.GC62839>
