On Thu, 21 Jun 2001 [EMAIL PROTECTED] 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 :)

my @arr = localtime($epoch_seconds);
my $nice_date = POSIX::sprintf("%Y-%m-%d %h:%m:%s", @arr);

.. or something like that.. man sprintf(3) for the exact format-string
details. You can also use Date::Manip but I prefer the POSIX way because
it's easier and doesn't require extra modules.


-- 
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]

Reply via email to