I don't know what kind of representation is that you mention. The customary way to represent time at the OS level, is the number of seconds elapsed since Jan 1 1970 00:00:00 (the Epoch). This is, for instance, what time() returns.
I guess you can get your conversion by using some snippet such as:
my $time = some_function_returning_the_time_you_want(); print "The interesting time was ", scalar localtime($time), "\n";
localtime() in a scalar context, will give you a nicely formatted string such as:
bash-2.05a$ perl -e 'print scalar localtime(), "\n"' Thu Jun 5 08:48:44 2003
In an array context, it will return the components of the date stamp. Please check your friendly perldoc -f localtime for the details.
Best regards
-lem, but some call me fokat
In reply to Re: How to convert time in perl?
by fokat
in thread How to convert time in perl?
by Steve4950
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |