2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhem.pl/fhemTimeGm fix by Boris (Forum #26679)

git-svn-id: https://svn.fhem.de/fhem/trunk@6495 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-09-01 10:07:43 +00:00
parent 4b257a40e9
commit ac428377e6

View File

@ -3672,8 +3672,7 @@ fhemTimeGm($$$$$$) {
$year+= 1900;
my $isleapyear= $year % 4 ? 0 : $year % 100 ? 1 : $year % 400 ? 0 : 1;
# here the Wikipedia as at 2012-12-01 is wrong and that code line is right
my $leapyears= int(($year-1968)/4 - ($year-1900)/100 + ($year-1600)/400);
my $leapyears= int(($year-1969)/4) - int(($year-1901)/100) + int(($year-1601)/400);
#Debug sprintf("%02d.%02d.%04d %02d:%02d:%02d %d leap years, is leap year: %d", $mday,$month+1,$year,$hour,$min,$sec,$leapyears,$isleapyear);
if ( $^O eq 'MacOS' ) {