You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The sunrise and set times for Auckland, NZ on March 20th and 21st are incorrect. Sunrise is reported as 11:12PM and 4:58AM, then on March 22nd it is back to accurate with 7:26AM
To Reproduce
Using the Sun example from the repo
use Andrmoel\AstronomyBundle\AstronomicalObjects\Sun;
use Andrmoel\AstronomyBundle\Location;
use Andrmoel\AstronomyBundle\TimeOfInterest;
date_default_timezone_set('NZDT');
for ($day = 15; $day < 25; $day++) {
// Auckland
$location = Location::create(-36.86297, 174.71185);
$datetime = new DateTime("2022-03-".$day."T00:00:00.000+00:00", new DateTimeZone("UTC"));
$date = (clone($datetime))->setTime(...[23,59,59])->setTimezone(new DateTimeZone('UTC'));
$toi = TimeOfInterest::createFromDateTime($date);
// Create sun
$sun = Sun::create($toi);
// Rise, set and upper culmination
$rise = $sun->getSunrise($location);
$culmination = $sun->getUpperCulmination($location);
$set = $sun->getSunset($location);
echo <<<END
+------------------------------------
| Date: {$sun->getTimeOfInterest()} UTC ---> Sunrise: {$rise->getDateTime()->format('Y-m-d H:i:s')} UTC ---> Sunset: {$set->getDateTime()->format('Y-m-d H:i:s')} UTC
+------------------------------------
END;
}
Expected behavior
Sunrise should be a smooth transition from March 19th (7:23am) to 22nd (7:26am)
Desktop (please complete the following information):
Describe the bug
The sunrise and set times for Auckland, NZ on March 20th and 21st are incorrect. Sunrise is reported as 11:12PM and 4:58AM, then on March 22nd it is back to accurate with 7:26AM
To Reproduce
Using the Sun example from the repo
use Andrmoel\AstronomyBundle\AstronomicalObjects\Sun;
use Andrmoel\AstronomyBundle\Location;
use Andrmoel\AstronomyBundle\TimeOfInterest;
date_default_timezone_set('NZDT');
for ($day = 15; $day < 25; $day++) {
END;
}
Expected behavior
Sunrise should be a smooth transition from March 19th (7:23am) to 22nd (7:26am)
Desktop (please complete the following information):
Additional context
There's PHP reported for doing something similar that may be of interest
https://bugs.php.net/bug.php?id=53148
The text was updated successfully, but these errors were encountered: