mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
fixed: use correct tzoffset to analyze CAP messages
git-svn-id: https://svn.fhem.de/fhem/trunk@5624 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2ef7b1e401
commit
0c5fd04419
@ -584,10 +584,24 @@ sub decodeCAPData($$){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# sub
|
||||||
|
# _calctz($@)
|
||||||
|
# {
|
||||||
|
# my ($nt,@lt) = @_;
|
||||||
|
|
||||||
|
# my $off = $lt[2]*3600+$lt[1]*60+$lt[0];
|
||||||
|
# $off = 12*3600-$off;
|
||||||
|
# $nt += $off; # This is noon, localtime
|
||||||
|
|
||||||
|
# my @gt = gmtime($nt);
|
||||||
|
|
||||||
|
# return (12-$gt[2]);
|
||||||
|
# }
|
||||||
|
|
||||||
sub checkCAPValid($){
|
sub checkCAPValid($){
|
||||||
my ($expires) = @_;
|
my ($expires) = @_;
|
||||||
my $valid = 0;
|
my $valid = 0;
|
||||||
my $offset = ReadingsVal('gdsOffset','state',0);
|
my $offset = _calctz(time,localtime(time))*3600; # used from 99_SUNRISE_EL
|
||||||
$expires =~ s/T/ /;
|
$expires =~ s/T/ /;
|
||||||
$expires =~ s/\+/ \+/;
|
$expires =~ s/\+/ \+/;
|
||||||
$expires = time_str2num($expires);
|
$expires = time_str2num($expires);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user