The relation between timestamp and geoposition is not good defined.
My try of a definition is:
date_sun_info —
Returns an array with information about sunset/sunrise and twilight begin/end as Unix-Timestamp for the the geoposition, which must have the same (local) date as the timestamp in the parameter-block for the function `date_sun_info`.
<?php
<?php
$tStamp = strtotime('2020-12-04');
$latitude = 50;
echo("\n");
foreach([-181,-180,0,180,360] as $longitude ) {
foreach([-86401,-86400,-86399, -1,0,1,86399, 86400,86401] as $variTimeStamp) {
$sunInfoList = date_sun_info(($tStamp-$variTimeStamp),$latitude, $longitude);
$sunrise = new DateTime('@'.$sunInfoList['sunrise']);
echo($sunInfoList['sunrise']. ' => '.$sunrise->format('H:i:s d.m.Y').' || [ '.$variTimeStamp.' // ' . $longitude.'° ]');
echo("\n");
}
echo("\n");
}
?>
You may recognize the equivalence of `[ 0 // 360° ]` and `[ 86400 // 0° ]` in the results.
The result is:
<?php
?>