#!/usr/bin/perl

#Part 1, converting a timestamp into readable date and time...

$UnixTimeStamp = 1284815445;

print "Timestamp $UnixTimeStamp is ";
print scalar localtime($UnixTimeStamp);
print "\n";

#Part 2, converting a local data and time into a Unix timestamp...

$year=2010;
$month=8;
$day=18;
$hour=9;
$minute=10;
$second=45;

use Time::Local;

$time = timelocal($second,$minute,$hour,$day,$month,$year);

print "$month/$day/$year, $hour:$minute:$second has a timestamp of $time\n";



