X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fsctweb;h=d9f9eff52a9ccff739a8a20fc629455ad909d61b;hp=1fa76cbbc3019ab9bd5765a770df66eaeb5a3cee;hb=9cf1dcbadd9469ad7d9731ecafbb5acb12efe405;hpb=56bd3054d001082bffd5d370acc3093186a44e6c 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));