--- AutoDisplay.pm 2007/04/05 02:34:42 1.1 +++ AutoDisplay.pm 2007/04/05 02:40:27 @@ -296,8 +296,6 @@ } sub checkOnOff { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - my $time = $hour * 60 * 60 + $min * 60; $::d_plugins && msg("Checking timer Autodisplay plugin\n"); @@ -308,6 +306,9 @@ my $brightness = $client->prefGet('PLUGIN.autodisplay_brightness'); my $clientname = $client->prefGet('playername'); + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(&getFuzzyTime($client)); + my $time = $hour * 60 * 60 + $min * 60; + #If client has autodisplay on/off preference and times set then continue... if (defined($flag) && defined($offtime) && defined($ontime)) { #If autodisplay has been set to "ON" then continue... @@ -478,7 +479,16 @@ } } + +sub getFuzzyTime { + my $client = shift; + if ( defined($Plugins::FuzzyTime::Plugin::apiVersion) ) { + return int(Plugins::FuzzyTime::Public::getClientTime($client)); + } + return time(); +} + 1;