--- EV/EV.pm 2018/09/04 23:14:45 1.151 +++ EV/EV.pm 2018/10/28 23:40:32 1.152 @@ -720,17 +720,15 @@ triggered, but might be called at other times, too. This can be used to create very complex timers, such as a timer that -triggers on each midnight, local time (actually 24 hours after the last -midnight, to keep the example simple. If you know a way to do it correctly -in about the same space (without requiring elaborate modules), drop me a -note :): +triggers on each midnight, local time (actually one day after the last +midnight, to keep the example simple): my $daily = EV::periodic 0, 0, sub { my ($w, $now) = @_; use Time::Local (); my (undef, undef, undef, $d, $m, $y) = localtime $now; - 86400 + Time::Local::timelocal 0, 0, 0, $d, $m, $y + Time::Local::timelocal_nocheck 0, 0, 0, $d + 1, $m, $y }, sub { print "it's midnight or likely shortly after, now\n"; };