Home : General : Perl Programming :

General: Perl Programming: Re: [nsync] Conversion to unix time: Edit Log

Here is the list of edits for this post
Re: [nsync] Conversion to unix time
Code:
print "Please enter unix time stamp\n";
chomp($unix_stmp = <STDIN>);
$unix_stmp += 8 * 60 * 60; # 8 hours
use Time::Local;
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($unix_stmp);
$year += 1900;
$mon += 1;
print "Real time = $hour:$min:$sec $mday/$mon/$year\n";

Last edited by:

Volker: Nov 17, 2005, 7:21 AM

Edit Log: