my $days = Delta_Days($1,$2,$3,$4,$5,$6);
my $firstday = Date::Calc->new($1,$2,$3);
my $lastday = Date::Calc->new($4,$5,$6);
- my $today = Date::Calc->today;
+ my $today = Date::Calc->new(Date::Calc->localtime(time+3600*6)->date);
my @days=();
foreach(split(" ",$class{'days'})) {
push @days, Decode_Day_of_Week($_);
next if(grep($_ == $today, @off));
return $today;
}
- $today = Date::Calc->today;
+ $today = Date::Calc->new(Date::Calc->gmtime->date);
for($today = ($today < $lastday ? $today : $lastday); $today > $firstday; $today--) {
next unless(grep($_ == Day_of_Week($today->date), @days));
next if(grep($_ == $today, @off));
if(defined($file) && (-d $file)) {
$row->{'instructor'} =~ s/^([^,]*), ([^,]*)(.*)/$2 $1$3/;
my $email = get_faculty_email $row->{'instructor'};
- $row->{'instructor'} = '"' . $row->{'instructor'} . '" <'. ($email || "$1\@from.sctweb" . ">");
+ $row->{'instructor'} = '"' . $row->{'instructor'} . '" <'. ($email || "$1\@from.sctweb") . ">";
$row->{'duration'} =~ /^(\d\d\d\d)(\d\d)(\d\d)-\d{8}$/;
$row->{'begin'} =~ /^(\d\d):(\d\d)$/;
my $next = next_class(%$row);
$row->{'duration'} =~ s/\d\d(\d\d)(\d\d)(\d\d)/$2-$3-$1/g;
print '<tr>';
print "<td>" . $row->{'id'} . "<br />" . $row->{'title'} . "</td>";
- print "<td>" . $row->{'instructor'} . "</td>";
+ my $instructor = $row->{'instructor'};
+ $instructor =~ s/^([^,]*), ([^,]*)(.*)/$2 $1$3/;
+ my $email = get_faculty_email($instructor);
+ #if($email) {
+ #print '<td><a href="mailto:' . $email . '">'
+ #. $row->{'instructor'} . "</a></td>";
+ # } else {
+ print "<td>" . $row->{'instructor'} . "</td>";
+ #}
print "<td>" . $row->{'days'} . "</td>";
print "<td>" . $row->{'time'} . "</td>";
print "<td>" . $row->{'duration'} . "</td>";