From 9cf1dcbadd9469ad7d9731ecafbb5acb12efe405 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 10 Sep 2004 02:30:04 +0000 Subject: [PATCH] Tweaked next_class --- perl/sctweb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/sctweb b/perl/sctweb index 1fa76cb..d9f9eff 100755 --- a/perl/sctweb +++ b/perl/sctweb @@ -56,7 +56,7 @@ sub next_class { 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($_); @@ -67,7 +67,7 @@ sub next_class { 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)); -- 2.30.2