On Thu, 21 Jun 2001, neuroticimbecile wrote:
..
> On Thu, 21 Jun 2001, you wrote:
> > Hi all,
> >
> > I'm looking for a way to convert epoch seconds into a readable format like
> > "Jun 12 2000" or "Feb 01 2001" using Perl :)
>
> try localtime(),
>
> print(localtime(time()))
when localtime() returns a scalar, you can't control how the output
"looks" hence
print POSIX::strftime("%blah", localtime($my_time))
is more flexible.
Update 'to hah, Mr FrancisV.. na-typo ko yung earlier mail ko. It's
strftime not sprintf =)
--
Orlando Andico <[EMAIL PROTECTED]>
Mosaic Communications, Inc.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GE d(-) s: a-25 C++++ UBLSI++++$ P+++ L+++>++++ E- W++ N(+)
o K? w O-- M- !V PS(++) PE- Y PGP-- t(+)@ 5(+) X++@ R(+) tv@
b++ DI++ G e++@ h--(*) r% y+
------END GEEK CODE BLOCK------
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]