2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +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:
betateilchen 2014-04-24 09:11:55 +00:00
parent 2ef7b1e401
commit 0c5fd04419

View File

@ -584,10 +584,24 @@ sub decodeCAPData($$){
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($){
my ($expires) = @_;
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/\+/ \+/;
$expires = time_str2num($expires);