plugin/wordfilter: only fetch the fields from localtime() that we actually use

This commit is contained in:
Daniel Brahneborg 2025-04-07 09:59:30 +02:00
parent aed3c525ac
commit da46bb68cd

View file

@ -17,7 +17,10 @@ sub dolog {
}
sub refresh_words {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
my @now = localtime();
my $year = $now[5];
my $mon = $now[4];
my $mday = $now[3];
my $dayno = 0 + ($year + 1900) * 10000 + $mon * 100 + $mday;
return unless ($dayno > $read_date);
@words = ();