Thanks John!

Dean

John Clarke wrote:
> 
> On Wed, Jan 31, 2001 at 10:11:46AM +1100, Dean Hamstead wrote:
> 
> > Thats not the problem
> 
> Sorry, my misunderstanding ...
> 
> localtime() and gmtime() will convert a Unix timestamp to hours, minutes,
> seconds etc, which is exactly what strftime needs:
> 
> [johnc@dropbear ~]$ perl -e 'use POSIX; print strftime("%a %b %e %H:%M:%S %Y", 
>localtime(980596729)), "\n"'
> Sat Jan 27 22:58:27 2001
> 
> Another way, if you merely want the time formatted like that and don't
> want a custom format, is to use the output of localtime() or gmtime()
> in a scalar context:
> 
> [johnc@dropbear ~]$ perl -e 'print scalar(localtime(980596729)),"\n"'
> Sat Jan 27 22:58:27 2001
> 
> Cheers,
> 
> John
> --
> whois [EMAIL PROTECTED]
> 
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug

-- 
BONG: http://www.bong.com.au
EMAIL...
[EMAIL PROTECTED]        [EMAIL PROTECTED]
[EMAIL PROTECTED]      [EMAIL PROTECTED]
ICQ: 16867613


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to