forked from public/public
plugin/wordfilter: only fetch the fields from localtime() that we actually use
This commit is contained in:
parent
aed3c525ac
commit
da46bb68cd
1 changed files with 4 additions and 1 deletions
|
@ -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 = ();
|
||||
|
|
Loading…
Add table
Reference in a new issue