Re: Date and Hour

From: Thilo Manske <Thilo.Manske@dont-contact.us>
Date: Tue, 27 Apr 1999 17:48:13 +0200

On Tue, Apr 27, 1999 at 05:27:19PM +0200, Andreas J. Koenig wrote:
> % time perl -le 'print scalar localtime(shift);' 924879043
> Fri Apr 23 16:50:43 1999
> perl -le print scalar localtime(shift); 924879043 0.02s user 0.00s system 10989% cpu 0.000 total
> % time perl -e 'use POSIX; print ctime(shift);' 924879043
> Fri Apr 23 16:50:43 1999
> perl -e use POSIX; print ctime(shift); 924879043 0.62s user 0.02s system 105% cpu 0.607 total
* time date -r 924879043
Fri Apr 23 16:50:43 MEST 1999

real 0m0.004s
user 0m0.000s
sys 0m0.002s

There's no need for perl at all on many un*ces (*BSD, Linux, etc.), for this
task date(1) is enough. (If speed is more important than portability)

-- 
Dies ist Thilos Unix Signature! Viel Spass damit.
Received on Tue Apr 27 1999 - 09:48:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:58 MST