1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/date/tests/bug-gh18076.phpt
Carlos Buenosvinos c9f3127ca8 Fix GH-18076: date_sun_info() function returns inaccurate sunrise and sunset times
Closes GH-18317: Avoid double counting the 15 minutes radial correction of the sun
2025-04-22 16:45:57 +01:00

13 lines
325 B
PHP

--TEST--
GH-18076 (Since PHP 8, date_sun_info() returns inaccurate sunrise and sunset times)
--FILE--
<?php
date_default_timezone_set("UTC");
$sun_info = date_sun_info(strtotime("2025-03-21"), 51.48, 0.0);
echo date("H:i:s\n", $sun_info['sunrise']);
echo date("H:i:s\n", $sun_info['sunset']);
?>
--EXPECT--
05:59:21
18:14:48