mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-07 22:29:19 +00:00
90_at.pm: add at_ultimo from betateilchen (Forum #117269)
git-svn-id: https://svn.fhem.de/fhem/trunk@23512 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1dd422b788
commit
98c3dda23f
@ -410,6 +410,20 @@ EOF
|
|||||||
return "$h1$h2</table></div><br>$j1$j2";
|
return "$h1$h2</table></div><br>$j1$j2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub
|
||||||
|
at_ultimo(;$$$)
|
||||||
|
{
|
||||||
|
my ($h,$m,$s) = @_;
|
||||||
|
$h //= 23;
|
||||||
|
$m //= 59;
|
||||||
|
$s //= 0;
|
||||||
|
my $add = $data{AT_RECOMPUTE} ? DAYSECONDS : 0;
|
||||||
|
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
|
||||||
|
localtime(time+$add);
|
||||||
|
my ($nm, $ny) = ($mon == 11) ? (0,$year+1) : ($mon+1,$year);
|
||||||
|
return mktime($s,$m,$h,1,$nm,$ny) - DAYSECONDS;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
@ -445,7 +459,7 @@ EOF
|
|||||||
any spaces or tabs.<br>
|
any spaces or tabs.<br>
|
||||||
|
|
||||||
<datespec> is either ISO8601 (YYYY-MM-DDTHH:MM:SS) or number of
|
<datespec> is either ISO8601 (YYYY-MM-DDTHH:MM:SS) or number of
|
||||||
seconds since 1970.
|
seconds since 1970 or {perlfunc()}.
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user