Filip Komar - 2020-04-11 14:02:58
First I would like to thank you for this class.
I noticed two different bugs though.
First is that date('G') according to php documentation returns integers from 0 to 23.
The second one is that sunrise and sunset hours are excluded.
The fixes are simple. Line:
if($now<$Msunrise && $now>=1){ //before sunrise
should be:
if($now<=$Msunrise && $now>=0){ //before sunrise
and second line:
elseif($now>$Msunset && $now<=24){ //after sunset
should be:
elseif($now>=$Msunset && $now<=23){ //after sunset