I added some lines to test this theory. Try running the code below without an argument, and then with an argument.
Tim
#!/usr/bin/perl
use strict;
use warnings;
use Time::Local;
my ($time, $month, $day, $year, $seconds, $minutes, $hours, $wday, $yday, $isdst);
my $start_date = '11/30/2012';
print "$start_date \n";
($month, $day, $year) = split(/\//, $start_date);
#Added this to populate the time
if (defined($ARGV[0])) {
print "Populating the time\n";
$seconds = 30;
$minutes = 30;
$hours = 11;
}
print $time = timegm($seconds, $minutes, $hours, $day, $month-1, $year-1900);
print "\n";
($seconds, $minutes, $hours, $day, $month, $year, $wday, $yday, $isdst) = localtime($time);
$month++;
$year = ($year+1900);
print "$month/$day/$year \n";
Bill
--
#!/usr/bin/perl
my $start_date = '11/30/2012';
print "$start_date \n";
print "\n";
$year = ($year+1900);
print "$month/$day/$year \n";