From: John Gaughan (jgaughan-ilug at domain irish-times.com)
Date: Sat 31 Aug 2002 - 23:29:44 IST
On Sat, 31 Aug 2002, Conor Daly wrote:
> On Fri, Aug 30, 2002 at 12:33:47PM +0100 or so it is rumoured hereabouts,
> kevin lyda thought:
> > On Fri, Aug 30, 2002 at 12:23:10PM +0000, Conor Daly wrote:
> > > takes 2002/7/1 and outputs 1025481600
> > >
> > > Can anyone tell me what will do the inverse?
> >
> > just barely a perl one-liner:
> >
> > perl -e 'use POSIX strftime;print(strftime("%Y/%m/%d\n",localtime(1025481600)))'
>
> Thanks guys, A nice selection to work with. Unfortunatels FreeBSD's
> "date -r" doesn't exist in GNU date!
You can do it with GNU date like this:
date -d '1970-01-01 1025481600 sec' +%Y/%m/%d
John.
-- John Gaughan, Systems Administrator Irish Times New Media - http://www.ireland.com/
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:34 GMT