Index: D:/eclipse/slimpy/Slim/Plugin/DateTime/Plugin.pm =================================================================== --- D:/eclipse/slimpy/Slim/Plugin/DateTime/Plugin.pm (revision 12352) +++ D:/eclipse/slimpy/Slim/Plugin/DateTime/Plugin.pm (working copy) @@ -138,8 +138,14 @@ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my $alarm = preferences('server')->client($client)->get('alarm'); - my $alarmOn = $alarm->[ 0 ] || $alarm->[ $wday ]; + my $alarmtime = preferences('server')->client($client)->get('alarmtime'); + my $currtime = $sec + 60*$min + 60*60*$hour; + my $tomorrow = ($wday+1) % 7 || 7; + my $alarmOn = $alarm->[ 0 ] + || ($alarm->[ $wday ] && $alarmtime->[ $wday ] > $currtime) + || ($alarm->[ $tomorrow ] && $alarmtime->[ $tomorrow ] < $currtime); + my $nextUpdate = $client->periodicUpdateTime(); Slim::Buttons::Common::syncPeriodicUpdates($client, int($nextUpdate)) if (($nextUpdate - int($nextUpdate)) > 0.01);