mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-17 05:16:02 +00:00
30_HUEBridge.pm: better offsetUTC calculation
git-svn-id: https://svn.fhem.de/fhem/trunk@12414 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cbe180b700
commit
3818615d34
@ -814,10 +814,11 @@ HUEBridge_Parse($$)
|
||||
|
||||
if( my $utc = $config->{UTC} ) {
|
||||
substr( $utc, 10, 1, '_' );
|
||||
my $sec = SVG_time_to_sec($utc);
|
||||
my $offset = time()-$sec;
|
||||
|
||||
$hash->{helper}{offsetUTC} = $offset;
|
||||
my $localtime = $config->{localtime};
|
||||
substr( $localtime, 10, 1, '_' );
|
||||
|
||||
$hash->{helper}{offsetUTC} = SVG_time_to_sec($localtime) - SVG_time_to_sec($utc);
|
||||
}
|
||||
|
||||
if( defined( $config->{swupdate} ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user